You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3606fd1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(state): three history writers hold their mutex until rollback ends (#1845)
* fix(state): three history writers hold their mutex until rollback ends
The control loop's history write, the SQLite history import and the
plain archive import held historyWriteMu around a transaction begun on
the *sql.DB. When that context ended, database/sql could report the Tx
done before SQLite had rolled it back, and the mutex went to the next
writer early. They now begin the transaction on a connection of their
own and close it before unlocking, as the batch and maintenance paths
already do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(changeset): the control loop already wrote on its own connection
Review note: the control loop writes through recordHistoryBatches,
which used a Conn already. recordHistoryBatch serves RecordTick*, which
only tests call, so the changeset no longer names the control loop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
When the import of older history or of plain archive files is stopped or runs out of time, other history writes now wait until SQLite has rolled it back. Before, the next write could start too early and then wait or fail as busy. No data was lost either way.
0 commit comments