-
Notifications
You must be signed in to change notification settings - Fork 755
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
Remove the strandId when doing generateCombinedTransactionId
in TransactionResourceManager
#41800
Conversation
When there is a separate strand created for a transaction block it registers in the `resourceRegistry` with its strandID. Finally when we commit the original transaction with the main strand and we look in the `resourceRegistry` With the main strandID and the results will be zero. Hence, the transaction won’t be committed. Since `resourceRegistry` is a map that holds list of `BallerinaTransactionContext`s for a given transaction block, we can prevent adding strandID to the keys of `resourceRegistry` which will fix the mismatch because of different strands.
generateCombinedTransactionId
in TransactionResourceManager
generateCombinedTransactionId
in TransactionResourceManager
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #41800 +/- ##
=========================================
Coverage 76.73% 76.73%
- Complexity 52715 52729 +14
=========================================
Files 2878 2878
Lines 198706 198736 +30
Branches 25825 25832 +7
=========================================
+ Hits 152475 152509 +34
+ Misses 37804 37801 -3
+ Partials 8427 8426 -1 ☔ View full report in Codecov by Sentry. |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
Purpose
When there is a separate strand created for a transaction block it registers in the
resourceRegistry
with its strandID. Finally when we commit the original transaction with the main strand and we look in theresourceRegistry
With the main strandID and the results will be zero. Hence, the transaction won’t be committed.Since
resourceRegistry
is a map that holds list ofBallerinaTransactionContext
s for a given transaction block, we can prevent adding strandID to the keys ofresourceRegistry
which will fix the mismatch because of different strands.Fixes #41682
Approach
Remove strandId when doing
generateCombinedTransactionId
inTransactionResourceManager
Samples
Test cases added via ballerina-platform/module-ballerina-sql#698
Remarks
Check List