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.8.x] Fix TypeCastError in concurrent transactions #41504

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.7.x] - #41505
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 [2201.8.x] Fix TypeCastError in concurrent transactions Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

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

Comparison is base (31661a2) 76.33% compared to head (f867006) 76.50%.
Report is 198 commits behind head on 2201.8.x.

Files Patch % Lines
.../runtime/transactions/TransactionLocalContext.java 0.00% 6 Missing ⚠️
...c/main/java/io/ballerina/cli/utils/DebugUtils.java 0.00% 5 Missing and 1 partial ⚠️
...ntime/transactions/TransactionResourceManager.java 0.00% 5 Missing ⚠️
...main/java/io/ballerina/cli/cmd/ProfileCommand.java 50.00% 2 Missing and 2 partials ⚠️
...in/java/io/ballerina/cli/task/RunProfilerTask.java 76.92% 2 Missing and 1 partial ⚠️
.../java/io/ballerina/projects/JBallerinaBackend.java 33.33% 0 Missing and 2 partials ⚠️
.../io/ballerina/cli/task/RunNativeImageTestTask.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             2201.8.x   #41504      +/-   ##
==============================================
+ Coverage       76.33%   76.50%   +0.17%     
- Complexity      52462    53146     +684     
==============================================
  Files            2881     2881              
  Lines          198393   202897    +4504     
  Branches        25783    26936    +1153     
==============================================
+ Hits           151439   155234    +3795     
- Misses          38604    39281     +677     
- Partials         8350     8382      +32     

☔ 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 21, 2023
@dsplayerX dsplayerX reopened this Jan 2, 2024
@gimantha gimantha merged commit e3c05d9 into ballerina-platform:2201.8.x Jan 3, 2024
9 of 11 checks passed
@hasithaa hasithaa removed the Stale label Jan 11, 2024
@dsplayerX dsplayerX added this to the 2201.8.6 milestone Apr 3, 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