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

[master] Fix TypeCastError in concurrent transactions #41506

Merged
merged 3 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

Fix [2201.7.x] - #41505
Fix [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.

@dsplayerX dsplayerX changed the title Fix TypeCastError in concurrent transactions [master] Fix TypeCastError in concurrent transactions Oct 13, 2023
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

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

Comparison is base (a4d7f0e) 76.69% compared to head (20d0438) 78.49%.
Report is 783 commits behind head on master.

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              @@
##             master   #41506      +/-   ##
============================================
+ Coverage     76.69%   78.49%   +1.79%     
- Complexity    52661    60700    +8039     
============================================
  Files          2881     2886       +5     
  Lines        198533   225374   +26841     
  Branches      25814    33821    +8007     
============================================
+ Hits         152258   176898   +24640     
- Misses        37835    39815    +1980     
- Partials       8440     8661     +221     

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

@MaryamZi MaryamZi added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Oct 26, 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.

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 bceb4d9 into ballerina-platform:master Jan 3, 2024
15 of 16 checks passed
@hasithaa hasithaa removed the Stale label Jan 11, 2024
@poorna2152 poorna2152 added this to the 2201.9.0 milestone Apr 3, 2024
@poorna2152 poorna2152 removed this from the 2201.9.0 milestone Apr 3, 2024
@dsplayerX dsplayerX added this to the 2201.9.0 milestone Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Transaction panics in endTransaction with "transaction not found"
6 participants