ID | IEP-3 | ||||||||
Author | Semen Boikov | ||||||||
Sponsor | Vladimir Ozerov Ozerov | ||||||||
Created | 22 Sep 2017 | ||||||||
Status |
|
...
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 Reads can be converted to blocking mode using SELECT ... FOR UPDATE
statement.
...
All DML requests are split into two groups: with and without reduce step. If reduce step is not needed, locks are obtained on map nodes immediately. If reduce step is needed (e.g. non-collocated aggregation), then we cannot lock rows on mapper immediately, because we do not know target row set in advance. In this case filter condition should be re-evaluated as well by executing distributed query again (TBD),
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.
...
Only MVCC-enabled transactional caches could be enlisted into transaction. An exception is throw If SQL statement use either ATOMIC
cache or TRANSACTIONAL
cache without MVCC support.
When executing DML statements locks are typically acquired in unpredictable order, what may cause deadlocks. Typically RDBMS vendors implement deadlock detectors which rollback last statement in case deadlock is found. Deadlock detection is expensive in distributed environment as it requires coordination between nodes over networks. In the first iteration we can define per-statement lock timeout. If locks cannot be obtained in the given timeout, statement is rolled-back and appropriate exception is thrown.
TBD
N/ATBD
N/A
Jira | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|