Details
-
Task
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
Description
From the very beginning, the default InnoDB transaction isolation level REPEATABLE READ does not correspond to any established definition. The main issue is the lack of write/write conflict detection. To fix that and to make REPEATABLE READ correspond to Snapshot Isolation, we introduced the Boolean session variable innodb_snapshot_isolation in MariaDB Server 10.6.18, 10.11.8, 11.4.2. It is disabled by default in order not to break any user applications.
In a new major version of MariaDB Server, we had better enable this parameter by default, so that bugs like MDEV-26642, MDEV-26643, MDEV-32898 will be avoided by default.
Attachments
Issue Links
- causes
-
MDEV-35488 innodb_snapshot_isolation is ON by default in 11.6+
-
- Closed
-
- relates to
-
MDEV-35647 Possible hang during CREATE TABLE…SELECT error handling
-
- Closed
-
-
MDEV-26642 Weird SELECT view when a record is modified to the same value by two transactions
-
- Closed
-
-
MDEV-26643 Inconsistent behaviors of UPDATE under RU & RC isolation level
-
- Closed
-
-
MDEV-32898 Phantom rows caused by UPDATE of PRIMARY KEY
-
- Closed
-
-
MDEV-35140 Support innodb-snapshot-isolation in Galera cluster
-
- Stalled
-
-
MDEV-36308 Unreasonable block in repeatable read
-
- Open
-
WRT enabling this so that you avoid bugs by default, I expect there to be far more bugs from workloads that depend (implicit and explicit) on the original behavior for InnoDB RR. And many of them will get bugs when they are quietly switched from original InnoDB RR to snapshot isolation on upgrading to 11.7.
The original InnoDB is complicated, isn't RR, but the different semantics it provides are valuable to some high throughput OLTP workloads.
In the InnoDB to MyRocks migrations, most workloads moved to RC with MyRocks because snapshot isolation will get more conflicts than InnoDB RR and the workloads preferred to avoid them. In some cases the workload owners were aware of the dependency on InnoDB RR and did the right thing so that their apps would continue to work. But in many cases the workload owners had no idea whether they depended on the special semantics of InnoDB RR. For those, we added logging to InnoDB to identify where they depended on it.
The my.cnf options in MyRocks for detecting usage of gap locks are: gap_lock_exceptions, gap_lock_log_file, gap_lock_raise_error,
gap_lock_write_log