-
Notifications
You must be signed in to change notification settings - Fork 55
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
Stabilize transactions support #267
Comments
Hi, As brought up in #266, the transactions feature will be critical to Ballerina to be a production ready programming language. This is based on the soon to be released jBallerina 1.0. The 1.0 version generally gives the idea that the prominent features available and stable. Specially, Ballerina positioned as a network distributed programming language, database transactions can be considered something fundamental that should be there. So is it possible to give this aspect more priority to improve the design (at least local transactions), validate its usage, and come to a point that, we can take it out of experimental status for jBallerina 1.0?. Or else, maybe we have to possibly think of a lower version label for the jBallerina release?. Cheers, |
There is now a proposal for this. |
@mohanvive @gimantha My thinking on outstanding nits is as follows:
We can discuss further if you disagree with any of these. |
Ack on 1, 2 and 4. (3) The behavior as per the current implementation for (5) We moved |
@pcnfernando I was confused on (3): what you are doing sounds good. But
|
Please have a look at 7.22 and 7.23 in the spec to make sure we are in alignment. |
Ack. (3) should be corrected as:
Furthermore, we'll be keeping the existing behavior for the rollback within a |
Clarification on making CommitHandler and RollbackHandler types isolated (1). eg: string ss = "";
@test:Config {
}
function testTrxHandlers() {
ss = ss + "started";
transactions:Info transInfo;
var onRollbackFunc = isolated function(transactions:Info? info, error? cause, boolean willTry) {
//ss = ss + " trxAborted"; # invalid access of mutable storage in an 'isolated' function
io:println("trxAborted");
};
var onCommitFunc = isolated function(transactions:Info? info) {
//ss = ss + " trxCommited"; # invalid access of mutable storage in an 'isolated' function
io:println("trxCommited");
};
transaction {
transInfo = transactions:info();
transactions:onRollback(onRollbackFunc);
transactions:onCommit(onCommitFunc);
trxfunction();
var commitRes = commit;
}
ss += " endTrx";
}
|
Yes, that is the effect of making these types isolated. |
Could potentially be split into two parts:
The text was updated successfully, but these errors were encountered: