Make workspace transactions deeply isolated and truly atomic #7
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority:P1
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/quasar#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
workspace.transactionin PR #3 shallow-copies document and graph values into a candidate workspace. Graph objects and their JSOWN node/edge arrays are therefore shared between the candidate and authoritative workspace.Graph operations mutate these arrays in place. A failed transaction can leak partial graph changes into authoritative state even when the candidate is discarded.
The existing rollback test only exercises duplicate document creation in a blank candidate. It does not copy an existing graph, mutate it, fail later, and verify the original graph is unchanged.
Several generated inverse operations are also malformed or semantically wrong, including document update inverses using
document.createand node/edge inverses nesting objects under payload shapes not consumed by their handlers.Found during review of PR #3.
Required changes
command/payloadformat, or explicitly version and document a different format.transaction.failedat the top level.Acceptance criteria
Related PR: #3