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 transaction panics in endTransaction with "transaction not found" #529

Merged
merged 10 commits into from
Jan 3, 2024

Conversation

dsplayerX
Copy link
Contributor

@dsplayerX dsplayerX commented Oct 5, 2023

Purpose

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

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Implemented essential locks when accessing the initiatedTransactions map to ensure concurrency safety.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Transaction Concurrency Test available. This test assesses the concurrency of isolated tasks executing transactions concurrently, verifying they complete a specified number of transactions successfully.

Security checks

Samples

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

Related PRs

ballerina-platform/ballerina-lang#41506
ballerina-platform/ballerina-lang#41505
ballerina-platform/ballerina-lang#41504

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

Tested on Ballerina 2201.8.0 and 2201.7.2.
Tested on Windows 10 19045.2006.

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@CLAassistant
Copy link

CLAassistant commented Oct 5, 2023

CLA assistant check
All committers have signed the CLA.

@dsplayerX dsplayerX changed the title Fix "Transaction panics in endTransaction with 'transaction not found'" Fix transaction panics in endTransaction with "transaction not found" Oct 5, 2023
@dsplayerX dsplayerX changed the base branch from master to 1.0.x October 6, 2023 03:48
@dsplayerX dsplayerX changed the base branch from 1.0.x to master October 6, 2023 03:48
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

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

Comparison is base (2037cb9) 54.31% compared to head (ee909bf) 53.73%.

Files Patch % Lines
transaction-ballerina/commons.bal 52.17% 22 Missing ⚠️
transaction-ballerina/transaction_block.bal 57.14% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #529      +/-   ##
============================================
- Coverage     54.31%   53.73%   -0.59%     
  Complexity       16       16              
============================================
  Files            22       22              
  Lines           672      683      +11     
  Branches        316      322       +6     
============================================
+ Hits            365      367       +2     
- Misses          306      315       +9     
  Partials          1        1              

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

Copy link

github-actions bot commented Nov 9, 2023

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 9, 2023
@poorna2152 poorna2152 removed the Stale label Nov 10, 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 Nov 25, 2023
@rdulmina
Copy link
Contributor

Shall we close this and reopen it when we start working on this again? @dsplayerX

@dsplayerX dsplayerX closed this Nov 27, 2023
@dsplayerX dsplayerX reopened this Jan 3, 2024
@gimantha gimantha merged commit b3bfec5 into ballerina-platform:master Jan 3, 2024
9 of 14 checks passed
dsplayerX added a commit to dsplayerX/module-ballerinai-transaction that referenced this pull request Mar 5, 2024
Updated lang version to 2201.8.5 for the release of fix ballerina-platform#529.
dsplayerX added a commit to dsplayerX/module-ballerinai-transaction that referenced this pull request Mar 5, 2024
This change is necessary for compatibility with pull request ballerina-platform#529, which requires changes released with version 2201.8.5.
This new branch 1.8.x will be used for future patches that require lang version 2201.8.x.
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.

Transaction panics in endTransaction with "transaction not found"
7 participants