Skip to content

Commit

Permalink
DBZ-7308 tableLockingStatement from SnapshotLock interface now takes …
Browse files Browse the repository at this point in the history
…just one table in input
  • Loading branch information
mfvitale committed Mar 18, 2024
1 parent 942ab80 commit d71858b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.sql.Savepoint;
import java.sql.Statement;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
Expand All @@ -32,7 +31,6 @@
import io.debezium.relational.Tables;
import io.debezium.schema.SchemaChangeEvent;
import io.debezium.snapshot.SnapshotterService;
import io.debezium.spi.snapshot.Snapshotter;
import io.debezium.util.Clock;

public class Db2SnapshotChangeEventSource extends RelationalSnapshotChangeEventSource<Db2Partition, Db2OffsetContext> {
Expand Down Expand Up @@ -90,7 +88,7 @@ else if (connectorConfig.getSnapshotIsolationMode() == SnapshotIsolationMode.EXC
}

Optional<String> lockingStatement = snapshotterService.getSnapshotLock().tableLockingStatement(connectorConfig.snapshotLockTimeout(),
Set.of(quoteTableName(tableId)));
quoteTableName(tableId));

if (lockingStatement.isPresent()) {
LOGGER.info("Locking table {}", tableId);
Expand Down

0 comments on commit d71858b

Please sign in to comment.