Skip to content

chore: alternative approach to reactive transaction management for sp… - #2886

Draft
Frederik Pietzko (frederikpietzko) wants to merge 10 commits into
bog-walk/pr-spring-reactive-tmfrom
frederikpietzko/spring-reactive-experiment
Draft

chore: alternative approach to reactive transaction management for sp…#2886
Frederik Pietzko (frederikpietzko) wants to merge 10 commits into
bog-walk/pr-spring-reactive-tmfrom
frederikpietzko/spring-reactive-experiment

Conversation

@frederikpietzko

Copy link
Copy Markdown
Collaborator

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:

  • exposed core can rely on ThreadLocal backed stack
  • transactions will be stored and resumed whenever spring decides suspend

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

@frederikpietzko Frederik Pietzko (frederikpietzko) changed the title chore: alternative approach to reactive transaction management for sp… DRAFT: chore: alternative approach to reactive transaction management for sp… Aug 15, 2026
@frederikpietzko
Frederik Pietzko (frederikpietzko) marked this pull request as draft August 15, 2026 18:03
@frederikpietzko Frederik Pietzko (frederikpietzko) changed the title DRAFT: chore: alternative approach to reactive transaction management for sp… chore: alternative approach to reactive transaction management for sp… Aug 15, 2026
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.

2 participants