DBZ-4331 Avoid holding metadata lock in R/O incremental snapshots

This commit is contained in:
Kate 2021-11-19 23:37:58 -05:00 committed by Gunnar Morling
parent 2347b58250
commit b51a4be019

View File

@ -177,14 +177,7 @@ public void processTransactionCommittedEvent(Partition partition, OffsetContext
}
protected void updateLowWatermark() {
try {
getExecutedGtidSet(getContext()::setLowWatermark);
// it is required that the chunk selection sees the changes that are committed before its execution
jdbcConnection.commit();
}
catch (SQLException e) {
throw new DebeziumException(e);
}
getExecutedGtidSet(getContext()::setLowWatermark);
}
protected void updateHighWatermark() {
@ -205,6 +198,7 @@ private void getExecutedGtidSet(Consumer<GtidSet> watermark) {
}
}
});
jdbcConnection.commit();
}
catch (SQLException e) {
throw new DebeziumException(e);