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

Fix ThreadLocal Issue with Repository Save. #1840

Merged

Conversation

mikereiche
Copy link
Collaborator

The issue was introduced when the Mono.deferContextual() was added to determine if the save() is in a transaction. It may be executing in a different thread when the PseudoArgs (scope, collection, and options) are retrieved ThreadLocal. This change ensures scope and collection are retrieved, but options are ignored and discarded.

Closes #1838.

@mikereiche mikereiche force-pushed the datacouch_1838_fix_threadlocal_issue_with_repository_save branch from 335614b to d7b5a05 Compare October 10, 2023 01:12
The issue was introduced when the Mono.deferContextual() was added to
determine if the save() is in a transaction. It may be executing in a
different thread when the PseudoArgs (scope, collection, and options)
are retrieved ThreadLocal. This change ensures scope and collection
are retrieved, but options are ignored and discarded.

Closes #1838.
@mikereiche mikereiche force-pushed the datacouch_1838_fix_threadlocal_issue_with_repository_save branch from d7b5a05 to cef273d Compare October 10, 2023 01:16
@mikereiche mikereiche merged commit 0abf846 into main Oct 10, 2023
mikereiche added a commit that referenced this pull request Oct 11, 2023
The issue was introduced when the Mono.deferContextual() was added to
determine if the save() is in a transaction. It may be executing in a
different thread when the PseudoArgs (scope, collection, and options)
are retrieved ThreadLocal. This change ensures scope and collection
are retrieved, but options are ignored and discarded.

Closes #1838.
mikereiche added a commit that referenced this pull request Oct 11, 2023
The issue was introduced when the Mono.deferContextual() was added to
determine if the save() is in a transaction. It may be executing in a
different thread when the PseudoArgs (scope, collection, and options)
are retrieved ThreadLocal. This change ensures scope and collection
are retrieved, but options are ignored and discarded.

Closes #1838.
@mikereiche mikereiche deleted the datacouch_1838_fix_threadlocal_issue_with_repository_save branch January 18, 2024 01:39
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.

DynamicProxyable for ReactiveCouchbaseRepository using ThreadLocal
1 participant