Skip to content

PHOENIX-7834 CDCBaseIT do not force-delete a never-upserted row#2451

Open
apurtell wants to merge 1 commit intoapache:masterfrom
apurtell:PHOENIX-7834
Open

PHOENIX-7834 CDCBaseIT do not force-delete a never-upserted row#2451
apurtell wants to merge 1 commit intoapache:masterfrom
apurtell:PHOENIX-7834

Conversation

@apurtell
Copy link
Copy Markdown
Contributor

@apurtell apurtell commented May 2, 2026

CDCBaseIT.generateMutations has a second-half "force a delete if there was none so far" branch that flips isDelete=true without checking whether the candidate row was ever upserted in this run, so when random batch participation has skipped a key in every prior batch the forced DELETE lands on a non-existent row and produces an HBase tombstone with no matching put. The data table view sees no change, and a later legitimate upsert for the same key surfaces as the next CDC change event on a forView=true CDC while the expected change list still has the tombstone marked as a delete, tripping CDCBaseIT.verifyChangesViaSCN with ComparisonFailure expected:<delete> but was:<upsert> in CDCQueryIT.testSelectGeneric[forView=true, encodingScheme=TWO_BYTE_QUALIFIERS, multitenant=false, tableSaltBuckets=null, withSchemaName=false, caseSensitiveNames=false]. The fix gates the forced-delete branch on mutatedRows.contains(rows.get(j)) so a delete is only ever forced on a row that has already been upserted.

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.

1 participant