Skip to content

Commit

Permalink
Say that storage is not transactional
Browse files Browse the repository at this point in the history
Part of #267
  • Loading branch information
jclark committed Dec 14, 2020
1 parent 35b7dcf commit c4e6c0d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8580,12 +8580,12 @@ <h4>Retry statement</h4>
<h3 id="transactions">Transactions</h3>

<p>
Ballerina supports distributed transactions. A global transaction consists of
multiple transaction branches, where a branch corresponds to work done by a
single strand of a Ballerina program that is part of the global transaction.
Every transaction branch is uniquely identified by an XID, which consists of an
identifier of the global transaction and an identifier of a branch with the
global transaction.
Ballerina provides language support for distributed transactions. A global
transaction consists of one or more transaction branches, where a branch
corresponds to work done by a single strand of a Ballerina program that is part
of the global transaction. Every transaction branch is uniquely identified by an
XID, which consists of an identifier of the global transaction and an identifier
of a branch with the global transaction.
</p>
<p>
At runtime, there is a mapping from each strand to a transaction stack, which is
Expand All @@ -8606,6 +8606,12 @@ <h3 id="transactions">Transactions</h3>
belongs.
</p>
<p>
Note that internal storage in Ballerina is not transactional. Rolling back a
transaction does <em>not</em> automatically restore the mutable values are
variables to their state when the transaction started. It is up to the
programmer to do this using commit or rollback handlers.
</p>
<p>
Static checking is based on the idea of a transactional scope: this is a lexical
region of the program where it is known that at runtime the strand executing the
region will always be in transactional mode. A function with the
Expand Down

0 comments on commit c4e6c0d

Please sign in to comment.