Skip to content

ENG-30396: XDCR and the XDCR oracle (milestone 23) - #23

Closed
jwiebema1 wants to merge 2 commits into
ENG-30396-sqlancer-m22from
ENG-30396-sqlancer-m23
Closed

jwiebema1 wants to merge 2 commits into
ENG-30396-sqlancer-m22from
ENG-30396-sqlancer-m23

Conversation

@jwiebema1

@jwiebema1 jwiebema1 commented Nov 10, 2026 •

Copy link
Copy Markdown

Milestone 23 of ENG-30396 (tracked in ENG-30581, epic ENG-30580 "SQL Housekeeping"): XDCR, and the XDCR oracle, which checks that the two clusters converge. Stacked on #22 (milestone 22), which is stacked on #21 and #20 to #1; review those first.

The nightly job adds an XDCR run once VoltDB/internal#6398 is merged; VoltDB/pro#7119 gives run-jenkins-sqlancer-test.sh the run shape.

Why

XDCR applies each cluster's changes on the other from its binary log, not by running the statements again. A row it drops or applies twice, or a materialized view the other side maintains wrongly from the replicated rows, leaves the two clusters different. No oracle so far reads a second cluster that got its rows this way.

What it changes

  • run-sqlancer.sh --xdcr: the script starts a second cluster of the same shape on the port slots from 20, and links the two by XDCR, active-active DR: DR id 1 here and 2 there, each with the other's replication ports as its source. It does not mix with --kill-interval, --resize-interval or --crash-interval.
    • It collects XDCR's conflict log (xdcr_conflicts/) into the results, and a conflict fails the run: no table is written on both sides, so there should be none.
    • The second cluster's logs go under servers/xdcr<i>/, and a node of it down at the end fails the run.
  • --xdcr host:port[,...] (provider option): each database connects to one of the pair, chosen at random, and writes and reads there only. The other is its peer:
    • every schema change (CREATE, DROP, ALTER, PARTITION and DR TABLE) that succeeds runs on the peer too, and a change the peer refuses marks the database split;
    • every table becomes a DR table on both sides before it holds rows.
  • XDCR (oracle/VoltDBXdcrOracle): compares every table and materialized view of the database on both clusters as multisets, retrying for up to 60 s while replication catches up, and fails with the rows found on one side only. A split database is skipped.
  • The summary counts the conflicts and the databases XDCR compared after convergence.
  • The README: an "XDCR" section, the options, the results files, the nightly table.

Bugs found

None in this milestone. A control run with one direction of the link broken failed every database written on that side. Milestone 29's lab run then found ENG-30630 here, an XDCR stream that pauses for good (see that PR).

Testing

…XDCR convergence)

With --xdcr the script starts a second cluster of the same shape and links the two by XDCR. Each database connects
to one of the pair, chosen at random, and writes there only; its schema changes run on the other cluster too, and
every table becomes a DR table before it holds rows. XDCR compares every table and view of the database on both
clusters, retrying for up to 60 s while replication catches up. The script collects XDCR's conflict log, and a
conflict fails the run, as no table is written on both sides. A control run with one direction of the link broken
failed every database written on that side.
@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
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