ballerina-platform / ballerina-lang

The Ballerina Programming Language
https://ballerina.io/
Apache License 2.0
3.68k stars 753 forks source link

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

Open warunalakshitha opened 6 days ago

warunalakshitha commented 6 days ago

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 commented 6 days ago

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. https://github.com/ballerina-platform/ballerina-lang/issues/43608