DBZ-6650 Align LogMiner included DML event behavior for truncates

This commit is contained in:
Chris Cranford 2023-07-13 12:17:53 -04:00 committed by Jiri Pechanec
parent 56ddbe21d5
commit b6f299b09c

View File

@ -718,6 +718,19 @@ else if (activeTransactions == 1) {
private void processTruncateEvent(LogMinerEventRow row) {
LOGGER.debug("Handling truncate event");
try {
// Truncate event is being treated as a DML.
Table table = getTableForDataEvent(row);
if (table == null) {
return;
}
}
catch (SQLException | InterruptedException e) {
LOGGER.warn("Failed to process truncate event.", e);
return;
}
addToTransaction(row.getTransactionId(), row, () -> {
final LogMinerDmlEntry dmlEntry = LogMinerDmlEntryImpl.forValuelessDdl();
dmlEntry.setObjectName(row.getTableName());