ID | IEP-3 |
Author | Vladimir Ozerov Ozerov |
Sponsor | Vladimir Ozerov Ozerov |
Created | 22 Sep 2017 |
Status | DRAFT |
At the moment Apache Ignite's SQL engine doesn't support transactions. SELECT
statements are executed on top of committed data without creating a snapshot. DML statements are executed as a series of batched updates using IgniteCache.invokeAll
command. As a result it is neither possible to get consistent view of data, nor to update it with ACID semantics.
We need to implement transactions support in SQL on top new MVCC protocol.
TX SQL will be implemented on top of existing snapshot-based MVCC infrastructure. Writes obtain locks on keys. Reads do not obtain locks. Writes do not block reads. Read can be converted to blocking mode using SELECT ... FOR UPDATE
statement.
In the first iteration only READ_COMMITTED mode will be supported.
Typical DML operation may modify any number of rows. it means we cannot store all modified rows on a near node. Current TX protocol must be extended, so that updates are stored on primary/backup nodes only and not transferred to near node.
No changes to existing API is needed. SQL statements will be enlisted into ongoing transaction if one is available. Only PESSIMISTIC/READ_COMMITTED is valid TX mode in the first iteration. Attempt to enlist SQL statement into any other TX mode will produce and exception.
TBD
TBD
TBD
N/A
N/A