DBZ-3838 Do not reset trx isolation when using minimal_percona

This commit is contained in:
Chris Cranford 2021-08-09 10:59:11 -04:00 committed by Gunnar Morling
parent c0fb820d97
commit 060420b0bc

View File

@ -194,10 +194,12 @@ protected void lockTablesForSchemaSnapshot(ChangeEventSourceContext sourceContex
// Continue anyway, since RDS (among others) don't allow setting a global lock
assert !isGloballyLocked();
}
if (!connectorConfig.getSnapshotLockingMode().equals(MySqlConnectorConfig.SnapshotLockingMode.MINIMAL_PERCONA)) {
// FLUSH TABLES resets TX and isolation level
connection.executeWithoutCommitting("SET TRANSACTION ISOLATION LEVEL REPEATABLE READ");
}
}
}
@Override
protected void releaseSchemaSnapshotLocks(RelationalSnapshotContext<MySqlPartition, MySqlOffsetContext> snapshotContext)