Skip to content

Direct commit and abort to their own store transaction - #60

Open
OskarEichler wants to merge 2 commits into
ruby:masterfrom
OskarEichler:codex/store-specific-transaction-tags
Open

Direct commit and abort to their own store transaction#60
OskarEichler wants to merge 2 commits into
ruby:masterfrom
OskarEichler:codex/store-specific-transaction-tags

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Use the PStore instance as the transaction catch/throw tag. Calling outer_store.commit or abort inside another store's transaction currently exits the inner transaction and continues the wrong block.

Reproduction and verification

Two independent scratch stores were nested for both outer commit and outer abort. The owning block must exit, the unwound inner store must not save, and the outer store must commit or abort as requested.

  • External focused corpus: 6 verified on this isolated branch under rbenv Ruby 4.0.6.
  • Existing upstream RBENV_VERSION=4.0.6 rbenv exec rake test: 13 tests / 26 assertions, zero failures before and after.
  • All files and injected failures are confined to scratch storage; no production operations.
  • No repository tests added or modified under the contributor's task constraint. Other Ruby versions and native Windows were not executed locally.

Breaking-change notes and limitations

Public commit/abort methods are unchanged. The private shared symbol tag is replaced; external code that relied on catching that undocumented symbol must use the public transaction API. Nesting a transaction on the same instance remains prohibited.

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.

1 participant