mysql-5.6
mysql-5.6 copied to clipboard
[mysql-5.6][PR] Range Locking support, MyRocks part, updated
Summary: (Range Locking pull request,filed against fb-mysql-8.0.23)
This adds a my.cnf parameter, rocksdb_use_range_locking.
When it is ON, MyRocks will:
- initialize RocksDB to use range-locking lock manager
- for all DML operations (including SELECT .. FOR UPDATE) will lock the scanned range before reading/modifying rows.
- In range locking mode, there is no snapshot checking (cannot do that for ranges). Instead, MyRocks will read and modify latest committed data, just like InnoDB does (in the code, grep for (start|end)ignore snapshot)
- Queries that do not have a finite range to scan, like UPDATE t1 .... ORDER BY t1.key LIMIT n will use a "Locking iterator" which will read rows, lock the range, and re-read the rows. See class LockingIterator.
Pull Request resolved: https://github.com/facebook/mysql-5.6/pull/1185 GitHub Author: Sergei Petrunia [email protected]
Continued in https://github.com/facebook/mysql-5.6/pull/1449