chore: alternative approach to reactive transaction management for sp… - #2886
Draft
Frederik Pietzko (frederikpietzko) wants to merge 10 commits into
Draft
Conversation
Frederik Pietzko (frederikpietzko)
marked this pull request as draft
August 15, 2026 18:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tries out an alternative approach for reactive transaction management.
The main idea is to continue to rely on the existing ThreadLocalTransactionStack and snapshotting & restoring the stack of transactions on coroutine enter/exit. The Snapshots are then kept in the Reactor context.
The Idea was inspired by the way that Futures interact with the call stack – serializing it and storing it in a context on suspension.
This might work because:
It is a bit hacky, a refactor of exposed core to carry the transaction stack in context for each method that needs it would be cleaner than relying on a thread local.
Full disclosure: The implementation is mostly generated by Fable