Skip to content

ENG-30396: the XCONFLICT oracle, XDCR conflicts on purpose, and ENG-30679 (milestone 38) - #37

Closed
jwiebema1 wants to merge 1 commit into
ENG-30396-sqlancer-m37from
ENG-30396-sqlancer-m38
Closed

jwiebema1 wants to merge 1 commit into
ENG-30396-sqlancer-m37from
ENG-30396-sqlancer-m38

Conversation

@jwiebema1

Copy link
Copy Markdown

Milestone 38 of ENG-30396 (tracked in ENG-30581, epic ENG-30580 "SQL Housekeeping"). Stacked on #36; review that and the PRs below it first.

Why

Milestone 30's coverage run found XDCR's conflict handling, and much of the replication of multi-partition writes, never exercised. The XDCR oracle writes each database through one cluster only, so no conflicts ever arise.

What it changes

  • The XCONFLICT oracle. In an XDCR run, each check writes the same keys through both clusters at once, on a DR table of its own.
    • After up to 60 s, every key on which the clusters still differ must be reported as diverged (D) in XDCR's conflict log. The oracle reads the log through the new --cluster-dir.
    • Each check starts from clusters that agree.
  • Conflict count. run-sqlancer.sh leaves these tables' conflicts out of the run's conflict count.

Bugs found

Ticket Issue Workaround while --avoid-known-bugs is true
ENG-30679 XDCR silently diverges when an insert on one cluster races an upsert and delete of the same key on the other: one cluster keeps the row, the other has none, and the conflict log says consistent (C). Reproduction: voltdb/repros/ENG-30679.sh with repros/xdcr/XdcrRepro.java. Lost data, Blocker. In this milestone, XCONFLICT deletes nothing. Milestone 41 changes this: deletes come back, and a silent divergence is counted rather than failed.

Testing

  • Local trial: two 3-node clusters (k=1), 5 minutes. This trial found ENG-30679, which was then reduced to the script.
  • mvn verify passes.
  • Lab: builds Add random seed to log sqlancer/sqlancer#56 and Log the random seed value sqlancer/sqlancer#57 of matrix-systemtest-apprunner-sqlancer (branch job ENG-30396-sqlancer-nightly, replays with these settings). They ran 16.1.0-SNAPSHOT (master kit 400) beside one node of 16.0.0, 45 minutes per run, with all thirty-one oracles.
    • Build Add random seed to log sqlancer/sqlancer#56 ran fork 585fbb8, milestones 34 to 43 before the last fix.
      • Reproductions: 84 still broken. ENG-30611 reports fixed, and the ticket is closed as fixed in V16.1.0.
      • Kill (3 nodes, k=1, a kill every 300 s): 8 kills, 8 rejoins.
      • Security (1 node, over TLS): PERMS checked 153 allowed and 174 refused statements; TASK made 286 checks.
      • Export with a kill every 300 s (3 nodes, k=2): all 4,617 rows exported, 1,240 through HTTP and 1,120 through JDBC (one twice).
      • Resize every 120 s: 10 grows, 9 shrinks.
      • XDCR: 340 XCONFLICT checks and 115 databases compared after convergence. 24 differing keys had no divergence logged; that is ENG-30679, counted rather than failed.
      • Crash every 600 s: 4 crashes, 4 recoveries.
      • Upgrade from 16.0.0 failed. A node being stopped for its upgrade refused DDL. The next fork commit handles this; see milestone 43.
    • Build Log the random seed value sqlancer/sqlancer#57 ran the upgrade run alone on fork e0cadfe, the head: 3 of 3 nodes upgraded, 414 TASK checks, 612 STATS calls and 15,923 primary key indexes checked.
    • Earlier builds: ENG-30789: the SQLCMD oracle: queries through sqlcmd as well as JDBC (milestone 58) #53 to Bump maven-surefire-plugin from 2.19.1 to 2.22.2 sqlancer/sqlancer#55 ran earlier heads of this stack. Their failures led to ENG-30682, ENG-30683, the ENG-30679 changes, the run-repros.sh port wait and TASK's timing fix.

…0679 (milestone 38)

Milestone 30's coverage run found XDCR's conflict handling and much of the
replication of multi-partition writes unexercised: the XDCR oracle writes each
database through one cluster only. In an XDCR run, XCONFLICT writes the same
keys through both clusters at once, on a DR table of its own, and after up to
60 s requires every key the clusters still differ on to be reported as
diverged (D) in XDCR's conflict log, which it reads through the new
--cluster-dir. Each check starts from clusters that agree. run-sqlancer.sh
leaves these tables' conflicts out of the run's conflict count.

ENG-30679 (Blocker): a DELETE of a key on one cluster racing a write of it on
the other leaves the clusters different, with every conflict logged as
consistent; repros/ENG-30679.sh replays it with repros/xdcr/XdcrRepro.java.
While avoiding known bugs, XCONFLICT deletes nothing.
@jwiebema1

Copy link
Copy Markdown
Author

Superseded by #51, which combines every ENG-30396 PR of this repo into one. This PR's branch is kept, and its description still has this milestone's details and lab results.

@jwiebema1 jwiebema1 closed this Nov 18, 2026
@jwiebema1
jwiebema1 deleted the ENG-30396-sqlancer-m38 branch November 25, 2026 13:44
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