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

[Bug]: Transactional always true after retry statement #43608

Open
warunalakshitha opened this issue Nov 19, 2024 · 1 comment
Open

[Bug]: Transactional always true after retry statement #43608

warunalakshitha opened this issue Nov 19, 2024 · 1 comment
Labels
Lang/Transactions Ballerina Transaction and its implementation related issued Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug

Comments

@warunalakshitha
Copy link
Contributor

warunalakshitha commented Nov 19, 2024

Description

Please refer following code.

import ballerina/io;
public function main() returns error? {
      retry transaction {
        boolean getErr = true;
        if (getErr) {
            getErr = false;
        } else {
            check commit;
        }
    }
    
    io:println(transactional);
}

Prints true which should be false

Steps to Reproduce

No response

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@warunalakshitha warunalakshitha added Type/Bug Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Lang/Transactions Ballerina Transaction and its implementation related issued Reason/EngineeringMistake The issue occurred due to a mistake made in the past. labels Nov 19, 2024
@warunalakshitha
Copy link
Contributor Author

After fixing this We need to enable tests which is broken after Java 21 changes because now we are running all tests in same strand.
#43608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lang/Transactions Ballerina Transaction and its implementation related issued Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Bug
Projects
None yet
Development

No branches or pull requests

1 participant