This is an automated email from the ASF dual-hosted git repository.
palashc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push:
new 4542a04175 PHOENIX-7834 CDCBaseIT do not force-delete a never-upserted
row (#2451)
4542a04175 is described below
commit 4542a04175a8460c621dd33f2cefd9d01b6124ec
Author: Andrew Purtell <[email protected]>
AuthorDate: Fri Jul 17 10:13:47 2026 -0700
PHOENIX-7834 CDCBaseIT do not force-delete a never-upserted row (#2451)
---
.../src/it/java/org/apache/phoenix/end2end/CDCBaseIT.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCBaseIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCBaseIT.java
index 9fbb38471d..c9fc7e70bf 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCBaseIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CDCBaseIT.java
@@ -332,8 +332,12 @@ public class CDCBaseIT extends ParallelStatsDisabledIT {
for (int j = 0; j < nRows; ++j) {
if (rand.nextInt(nRows) % 2 == 0) {
boolean isDelete;
- if (i > nBatches / 2 && !gotDelete) {
- // Force a delete if there was none so far.
+ // Only force a delete on rows that have already been upserted in
this run; deleting a
+ // never-inserted row produces a no-op tombstone on the data table
while CDC still
+ // surfaces a later upsert for the same key, deterministically
tripping the
+ // delete-vs-upsert assertion in verifyChangesViaSCN. If no
candidate exists yet, defer
+ // the forced delete to a later batch (the loop will reconsider on
the next iteration).
+ if (i > nBatches / 2 && !gotDelete &&
mutatedRows.contains(rows.get(j))) {
isDelete = true;
} else {
isDelete = mutatedRows.contains(rows.get(j)) && rand.nextInt(5) ==
0;