-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
None
-
False
-
False
-
undefined
-
Mysql Snapshot may be loss data when snapshot.locking.mode = none:
- FLUSH TABLES WITH READ LOCK acquires the global lock and essentially flushes then freezes the binlog(it will not be performed if snapshot.locking.mode = none)
- START TRANSACTION WITH CONSISTENT SNAPSHOT
- Read database names
- Read table names
- SHOW MASTER STATUS (insert a lot of data before that,data will be lost due to binlog position is move after START TRANSACTION when snapshot.locking.mode = none )
- Get the table DDL
- UNLOCK TABLES
- Copy the data
- COMMIT
If the lock is none, it will not prevent the database write, so the data consistency between step 2 and Step 5 cannot be guaranteed.
The root cause : repeatable read cannot guarantee the consistency of binglog position and data!