Skip to content

CASSANALYTICS-196: Skip CDC-irrelevant mutations on deserialization failure - #241

Open
yifan-c wants to merge 1 commit into
apache:trunkfrom
yifan-c:CASSANALYTICS-TBD/skip-cdc-irrelevant-mutation-on-deser-failure
Open

yifan-c wants to merge 1 commit into
apache:trunkfrom
yifan-c:CASSANALYTICS-TBD/skip-cdc-irrelevant-mutation-on-deser-failure

Conversation

@yifan-c

@yifan-c yifan-c commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Patch by Yifan Cai; Reviewed by TBD for CASSANALYTICS-196

…ailure

Patch by Yifan Cai; Reviewed by TBD for CASSANALYTICS-196
return false;
}

if (updateCount > 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we check this before we need to extract the tableId and the metadata? (just at line 638)

{
JVMStabilityInspector.inspectThrowable(t);

if (failedMutationHasNoCdcTable(inputBuffer, size))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is scary that this new behavior doesn't break a pre-existing test :-(

Comment on lines +69 to +70
CassandraBridgeImplementation.setup();
TableId unknownTableId = TableId.fromUUID(UUID.randomUUID());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe move these two to a helper getUnregisteredTable method?

* when the table's metadata can't be found, or even the first {@link TableId} can't be read
*/
@VisibleForTesting
static boolean failedMutationHasNoCdcTable(byte[] inputBuffer, int size)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is just me, but I tend to not like the negative on method names. HasNo + false is what we are looking for here -> that double negative always messes my head :-P

What do you think on having a failedMutationHasCdcTable method instead that returns true if it needs to be handled, and false if it needs to be ignored?

Obviously not a blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants