mysql-5.6 icon indicating copy to clipboard operation
mysql-5.6 copied to clipboard

[mysql-5.6][PR] Range Locking support, MyRocks part, updated

Open hermanlee opened this issue 1 year ago • 1 comments

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]

hermanlee avatar Feb 21 '24 17:02 hermanlee

Continued in https://github.com/facebook/mysql-5.6/pull/1449

laurynas-biveinis avatar Apr 26 '24 11:04 laurynas-biveinis