Skip to content

Use concurrent set behind reactive TransactionSynchronizationManager#registerSynchronization #35921

@zhou-hao

Description

@zhou-hao

Concurrent execution of registerSynchronization and getSynchronization may result in errors .

Image

The context uses LinkedHashSet:

public void initSynchronization() throws IllegalStateException { if (isSynchronizationActive()) { throw new IllegalStateException("Cannot activate transaction synchronization - already active"); } this.transactionContext.setSynchronizations(new LinkedHashSet<>()); }

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions