Skip to content

ENG-30396: the LOAD and SWAP oracles, @ValidatePartitioning, and ENG-30674 (milestone 35) - #34

Closed
jwiebema1 wants to merge 1 commit into
ENG-30396-sqlancer-m34from
ENG-30396-sqlancer-m35
Closed

jwiebema1 wants to merge 1 commit into
ENG-30396-sqlancer-m34from
ENG-30396-sqlancer-m35

Conversation

@jwiebema1

Copy link
Copy Markdown

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

Why

Milestone 30's coverage run found the bulk-operation system procedures barely exercised:

  • @LoadMultipartitionTable: 3 of 104 lines
  • @LoadSinglepartitionTable: 2 of 76
  • @SwapTables: 1 of 18, and the engine's swap executor 0
  • @ValidatePartitioning: 3 of 62

What it changes

  • LOAD. Each check loads a batch into one of two twin tables with the system procedure, in insert or upsert mode, and applies the same rows to the other twin as single statements.
    • If the batch loads, the twins must match and the row count must be right.
    • If a row broke a constraint, the whole load must fail and leave its twin unchanged.
  • SWAP. Each check swaps two twins, once or twice. Each twin must then hold the other's rows, findable through every index.
  • Partitioning check. After every LOAD and SWAP check, @ValidatePartitioning must find no row in the wrong partition.
  • Build. voltdbclient becomes a compile dependency, for VoltTable and VoltType.
  • Runners and README. run-sqlancer.sh's summary reports the TTL and LOAD counts. run-coverage.sh runs TTL, LOAD and SWAP. The README's status covers milestones 33 to 35.

Bugs found

Ticket Issue Workaround while --avoid-known-bugs is true
ENG-30674 @ValidatePartitioning passes a malformed hash configuration from the client to the EE unchecked, and the server crashes (SIGSEGV in ElasticHashinator::newInstance); exec @ValidatePartitioning 'AB' is enough. Reproduction: voltdb/repros/ENG-30674.sql. Server crash, Blocker; now Resolved. The oracles pass NULL.

Coverage (master bf8602e3, run-coverage.sh's kill run, 15 minutes, every oracle)

Class Milestone 30 This milestone
@LoadMultipartitionTable 3 of 104 88 of 104
@LoadSinglepartitionTable 2 of 76 50 of 76
@SwapTables 1 of 18 13 of 18
Swap executor (EE) 0 of 60 56 of 60
@ValidatePartitioning 3 of 62 59 of 62

Testing

  • Local trials:
    • 1 node, 90 seconds: 643 loads (263 batches rejected as a whole), 986 swaps and 1,286 validations.
    • 3 nodes, k=1, a node killed every 60 s, 5 minutes: passed.
  • 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.

…h, and ENG-30674 (milestone 35)

Milestone 30's coverage run found the bulk-operation system procedures
unexercised: @LoadMultipartitionTable, @LoadSinglepartitionTable, @SwapTables
(and the engine's swap executor) and @ValidatePartitioning.

- LOAD loads a batch into one twin table by the system procedure, in insert or
  upsert mode, and applies the same rows to the other as single statements:
  the twins must match and the count be right, or, when a statement broke a
  constraint, the load must fail as a whole and leave its twin unchanged.
- SWAP swaps two twins, once or twice: each must hold the other's rows,
  findable through each index.
- After each, @ValidatePartitioning must find no row in the wrong partition.
- ENG-30674: @ValidatePartitioning crashes the server on a hash configuration
  it cannot parse; repros/ENG-30674.sql. The oracles pass NULL.
- voltdbclient becomes a compile dependency (VoltTable, VoltType).
- run-sqlancer.sh's summary reports TTL's and LOAD's counts; run-coverage.sh
  runs TTL, LOAD and SWAP; the README's status covers milestones 33 to 35.
@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-m35 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