Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: do not use the CD_OLD_SYNCHPOINT as the stop lsn parameter #158

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/main/java/io/debezium/connector/db2/Db2ChangeTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,21 @@ public class Db2ChangeTable extends ChangeTable {
/**
* A LSN to which the data in the change table are relevant
*/
private Lsn stopLsn;
private Lsn stopLsn = Lsn.NULL;

/**
* The table in the CDC schema that captures changes, suitably quoted for Db2
*/
private final String db2CaptureInstance;

public Db2ChangeTable(TableId sourceTableId, String captureInstance, int changeTableObjectId, Lsn startLsn, Lsn stopLsn, String tableCdcSchema) {
public Db2ChangeTable(TableId sourceTableId, String captureInstance, int changeTableObjectId, Lsn startLsn, String tableCdcSchema) {
super(captureInstance, sourceTableId, resolveChangeTableId(sourceTableId, captureInstance, tableCdcSchema), changeTableObjectId);
this.startLsn = startLsn;
this.stopLsn = stopLsn;
this.db2CaptureInstance = Db2ObjectNameQuoter.quoteNameIfNecessary(captureInstance);
}

public Db2ChangeTable(String captureInstance, int changeTableObjectId, Lsn startLsn, Lsn stopLsn, String tableCdcSchema) {
this(null, captureInstance, changeTableObjectId, startLsn, stopLsn, tableCdcSchema);
public Db2ChangeTable(String captureInstance, int changeTableObjectId, Lsn startLsn, String tableCdcSchema) {
this(null, captureInstance, changeTableObjectId, startLsn, tableCdcSchema);
}

public String getCaptureInstance() {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/io/debezium/connector/db2/Db2Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ public Set<Db2ChangeTable> listOfChangeTables() throws SQLException {
rs.getString(4),
rs.getInt(9),
Lsn.valueOf(rs.getBytes(5)),
Lsn.valueOf(rs.getBytes(6)),
connectorConfig.getCdcChangeTablesSchema()

));
Expand All @@ -295,7 +294,6 @@ public Set<Db2ChangeTable> listOfNewChangeTables(Lsn fromLsn, Lsn toLsn) throws
rs.getString(2),
rs.getInt(1),
Lsn.valueOf(rs.getBytes(3)),
Lsn.valueOf(rs.getBytes(4)),
connectorConfig.getCdcChangeTablesSchema()));
}
return changeTables;
Expand Down
Loading