Skip to content

Commit

Permalink
DBZ-4999 Provide hook to allow Informix to avoid blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
jpechane committed Oct 20, 2023
1 parent 4beb3ae commit 13d1b4e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ private void doCreateDataEventsForTable(ChangeEventSourceContext sourceContext,
Instant sourceTableSnapshotTimestamp = getSnapshotSourceTimestamp(jdbcConnection, offset, table.id());

try (Statement statement = readTableStatement(jdbcConnection, rowCount);
ResultSet rs = CancellableResultSet.from(statement.executeQuery(selectStatement))) {
ResultSet rs = resultSetForDataEvents(selectStatement, statement)) {

ColumnUtils.ColumnArray columnArray = ColumnUtils.toArray(rs, table);
long rows = 0;
Expand Down Expand Up @@ -588,6 +588,11 @@ private void doCreateDataEventsForTable(ChangeEventSourceContext sourceContext,
}
}

protected ResultSet resultSetForDataEvents(String selectStatement, Statement statement)
throws SQLException {
return CancellableResultSet.from(statement.executeQuery(selectStatement));
}

private void setSnapshotMarker(OffsetContext offset, boolean firstTable, boolean lastTable, boolean firstRecordInTable,
boolean lastRecordInTable) {
if (lastRecordInTable && lastTable) {
Expand Down

0 comments on commit 13d1b4e

Please sign in to comment.