Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckedExportingTransactionManager is not thread-safe #220

Open
martinaubele opened this issue Jun 26, 2024 · 0 comments
Open

CheckedExportingTransactionManager is not thread-safe #220

martinaubele opened this issue Jun 26, 2024 · 0 comments

Comments

@martinaubele
Copy link

martinaubele commented Jun 26, 2024

In a load test with many concurrent calls we got errors like:
"Pending outgoing remote request detected at transaction commit

  • forcing rollback since commit scope will not be as expected!"

We found out that CheckedExportingTransactionManager uses a HashMap in an unsafe way. We could fix the problem by changing the line

private static Map<String,PendingRequestSynchronisation> pendingRequestSynchronisation = new HashMap<String,PendingRequestSynchronisation>();

to

private static Map<String,PendingRequestSynchronisation> pendingRequestSynchronisation = new ConcurrentHashMap<String,PendingRequestSynchronisation>();

please see #221

martinaubele added a commit to martinaubele/transactions-essentials that referenced this issue Jun 26, 2024
CheckedExportingTransactionManager is not thread-safe
martinaubele added a commit to martinaubele/transactions-essentials that referenced this issue Jun 26, 2024
CheckedExportingTransactionManager is not thread-safe

(cherry picked from commit ce4fe74)
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

No branches or pull requests

1 participant