DBZ-7640 Get row count if snapshot ordering required
This commit is contained in:
parent
657492d323
commit
b02fa04f1d
@ -48,6 +48,7 @@
|
||||
import io.debezium.pipeline.notification.NotificationService;
|
||||
import io.debezium.pipeline.source.SnapshottingTask;
|
||||
import io.debezium.pipeline.source.spi.SnapshotChangeEventSource;
|
||||
import io.debezium.relational.RelationalDatabaseConnectorConfig.SnapshotTablesRowCountOrder;
|
||||
import io.debezium.relational.RelationalSnapshotChangeEventSource;
|
||||
import io.debezium.relational.RelationalTableFilters;
|
||||
import io.debezium.relational.Table;
|
||||
@ -548,7 +549,7 @@ protected OptionalLong rowCountForTable(TableId tableId) {
|
||||
if (getSnapshotSelectOverridesByTable(tableId, connectorConfig.getSnapshotSelectOverridesByTable()) != null) {
|
||||
return super.rowCountForTable(tableId);
|
||||
}
|
||||
if (ROW_ESTIMATE_LOGGER.isInfoEnabled()) {
|
||||
if (ROW_ESTIMATE_LOGGER.isInfoEnabled() || connectorConfig.snapshotOrderByRowCount() != SnapshotTablesRowCountOrder.DISABLED) {
|
||||
OptionalLong rowCount = connection.getEstimatedTableSize(tableId);
|
||||
LOGGER.info("Estimated row count for table {} is {}", tableId, rowCount);
|
||||
return rowCount;
|
||||
|
Loading…
Reference in New Issue
Block a user