Skip to content

Commit

Permalink
DBZ-4331 Avoid holding metadata lock in R/O incremental snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
kgalieva authored and gunnarmorling committed Nov 30, 2021
1 parent 2347b58 commit b51a4be
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -205,6 +198,7 @@ private void getExecutedGtidSet(Consumer<GtidSet> watermark) {
}
}
});
jdbcConnection.commit();
}
catch (SQLException e) {
throw new DebeziumException(e);
Expand Down

0 comments on commit b51a4be

Please sign in to comment.