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

[2201.7.x] Fix TypeCastError in concurrent transactions #41505

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

dsplayerX
Copy link
Contributor

@dsplayerX dsplayerX commented Oct 11, 2023

Purpose

Fixes the TypeCastError when running multiple transactions concurrently.

Fixes #41281 and https://github.com/ballerina-platform/module-ballerinai-transaction/issues/524

Approach

Changed the transactionInfoMap to a ConcurrentHashMap instead of a HashMap to resolve the issue where infoRecord was becoming nil when accessing transactionInfoMap concurrently.

Samples

Provide high-level details about the samples related to this feature.

Remarks

[master] - #41506
[2201.8.x] - #41504
Related Issues - https://github.com/ballerina-platform/module-ballerinai-transaction/issues/524
Related PR - ballerina-platform/module-ballerinai-transaction#529
Test Available in https://github.com/ballerina-platform/module-ballerinai-transaction

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@CLAassistant
Copy link

CLAassistant commented Oct 11, 2023

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (e31b299) 76.46% compared to head (bca1b13) 76.42%.
Report is 40 commits behind head on 2201.7.x.

Files Patch % Lines
.../runtime/transactions/TransactionLocalContext.java 0.00% 6 Missing ⚠️
...ntime/transactions/TransactionResourceManager.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             2201.7.x   #41505      +/-   ##
==============================================
- Coverage       76.46%   76.42%   -0.04%     
- Complexity      55315    55497     +182     
==============================================
  Files            3387     3387              
  Lines          208487   209589    +1102     
  Branches        26966    27319     +353     
==============================================
+ Hits           159413   160176     +763     
- Misses          40315    40617     +302     
- Partials         8759     8796      +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Nov 30, 2023
@poorna2152 poorna2152 removed the Stale label Dec 1, 2023
Copy link

This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.

@github-actions github-actions bot added the Stale label Dec 16, 2023
Copy link

Closed PR due to inactivity for more than 18 days.

@github-actions github-actions bot closed this Dec 20, 2023
@dsplayerX dsplayerX reopened this Jan 2, 2024
@gimantha gimantha merged commit 8a711c7 into ballerina-platform:2201.7.x Jan 3, 2024
8 of 11 checks passed
@hasithaa hasithaa removed the Stale label Jan 11, 2024
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.

5 participants