DBZ-5792: Handle TRUNCATE type

This commit is contained in:
rajdangwal 2022-11-09 00:27:31 +05:30 committed by Jiri Pechanec
parent ea2983c8d8
commit 7bf889006f

View File

@ -133,11 +133,17 @@ public boolean shouldMessageBeSkipped(ByteBuffer buffer, Lsn lastReceivedLsn, Ls
switch (type) {
case TYPE:
case ORIGIN:
case TRUNCATE:
// TYPE/ORIGIN/TRUNCATE
// TYPE/ORIGIN
// These should be skipped without calling shouldMessageBeSkipped. DBZ-5792
LOGGER.trace("{} messages are always skipped without calling shouldMessageBeSkipped", type);
return true;
case TRUNCATE:
if (!isTruncateEventsIncluded()) {
LOGGER.trace("{} messages are being skipped without calling shouldMessageBeSkipped", type);
return true;
}
// else delegate to super.shouldMessageBeSkipped
break;
default:
// call super.shouldMessageBeSkipped for rest of the types
}