Skip to content

database.undoableWrite#3

Open
rcarver wants to merge 1 commit intomainfrom
undoable-write
Open

database.undoableWrite#3
rcarver wants to merge 1 commit intomainfrom
undoable-write

Conversation

@rcarver
Copy link
Contributor

@rcarver rcarver commented Feb 8, 2026

Reworking the high level api, fixes #1

Currently with the undoable block, you can perform any db operations. When the block closes it captures the logged events for undo stack. However this means that the operations themselves and the undo stack management happen in separate transations. There's a case that some other operation could slip between those and corrupt the undo stack.

intead, introduce databse.undoableWrite { db in ... } which wraps that all into a single transaction, plus saves an additional indent/2 lines of code.

We'll keep the separate undoable block but name it more explicitly for cases where the new api isn't sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix race condition in barrier seq range tracking

1 participant