Skip to content

ENG-30396: elastic resize in the middle of a run (milestone 21) - #21

Closed
jwiebema1 wants to merge 2 commits into
ENG-30396-sqlancer-m20from
ENG-30396-sqlancer-m21
Closed

jwiebema1 wants to merge 2 commits into
ENG-30396-sqlancer-m20from
ENG-30396-sqlancer-m21

Conversation

@jwiebema1

Copy link
Copy Markdown

Milestone 21 of ENG-30396 (tracked in ENG-30581, epic ENG-30580 "SQL Housekeeping"): elastic resizes in the middle of a run. Stacked on #20 (milestone 20), which is stacked on #19 to #1; review those first.

The nightly job adds a run with resizes once VoltDB/internal#INTERNAL_PR is merged; VoltDB/pro#PRO_PR gives run-jenkins-sqlancer-test.sh the run shape.

Why

Node failures (milestone 12) move partition leaders between nodes that already hold the data. An elastic resize moves the data itself: a join adds a partition group and migrates rows into it, and a remove migrates them back and drops it. The oracles keep checking query results while that happens, so a row lost, doubled or read from the wrong partition during a migration fails the run.

What it changes

  • run-sqlancer.sh --resize-interval S: every S seconds, the script adds k+1 nodes with voltdb start --add, or removes them again with voltadmin resize, by turns. It does not mix with --kill-interval.
    • Grow. VoltDB refuses a join while a catalog update is in progress, which SQLancer's DDL makes common, and the joiner exits. The script keeps the refused attempt's logs as add<n>-<j>-rejected<a> and tries again, up to 10 times. A grow is done once the new nodes have started and the topology has settled (voltadmin resize --test plans to remove only them, about 40 s after the join).
    • Shrink. A shrink is done once the removed servers have exited.
    • A step that takes over 600 s fails the run, as do FATAL lines in an added node's log. resize.log records each step; the added nodes' logs go under servers/add<n>-<j>/.
  • --resizes true (provider option): a shrink drops the calls in flight on the hosts it removes, so the provider expects the errors of a killed node. The --node-failures workarounds for ENG-30612 do not apply.
  • --ddl-hold FILE (provider option): while the file exists, VoltDBConnection holds every DDL statement, for up to 15 minutes. The script creates it 3 s before each shrink and deletes it once the shrink is done, which works around ENG-30622 below. With --avoid-known-bugs false the provider ignores it.
  • The JDBC metadata calls are retried for up to 150 s when they hit ENG-30229. An elastic join, like a rejoin, makes @SystemInformation and @SystemCatalog time out after 60 s ("OPS request hit sixty second timeout", "Too many pending stat requests"). The driver's getMetaData() and DatabaseMetaData calls send those, and SQLancer reads the schema with them.
  • No ASSUMEUNIQUE keys while the cluster resizes. ASSUMEUNIQUE holds only within a partition, so rows in two partitions can share a key. A shrink that moves one of them next to the other fails with "Found duplicates while rebalancing data" (lab build ENG-30396: the IMPORT oracle, lab build #53's fixes, ENG-30682 and ENG-30683 (milestone 41) #40). With --resizes, the table and index generators make no ASSUMEUNIQUE constraint or index.
  • Fixes run-sqlancer.sh on macOS: BSD seq -s '|' ends the list with the separator, which made an empty alternative in the regex that tells when a grow has settled.
  • The README: an "Elastic resizes" section, the option, the results files, the nightly table (now with DIFF among the oracles), and the bug table.

Bugs found

Ticket Issue Workaround while --avoid-known-bugs is true
ENG-30622 An elastic remove hangs for good at "Building index for data migration" when a table is dropped while the remove streams its index snapshot. The hosts being removed log "No table streamer of Type TABLE_STREAM_ELASTIC_INDEX" and "Snapshot of table ... failed to complete", and voltadmin resize --status stays at "Planning data migration". Also on 16.0.0. Found by a local trial in which SQLancer's cleanup of an old database dropped its tables during a shrink. A 50-line script reproduces it within 4 cycles. Critical. DDL waits during each shrink (--ddl-hold).
ENG-30229 (existing) System requests time out for 60 s during an elastic join, as during a rejoin, and so do the JDBC metadata calls. The connection retries them for up to 150 s.

Testing

…row and shrink while SQLancer runs)

Every S seconds the script adds k+1 nodes with voltdb start --add, or removes them again with voltadmin resize, by
turns. A join refused during a catalog update is retried; a grow is done once the topology has settled, a shrink once
the removed servers have exited, and a step that takes over 600 s fails the run.

The provider gets --resizes true (a shrink drops the calls in flight on the removed hosts, as a kill does) and
--ddl-hold: DDL waits while the script holds it around each shrink, as a table dropped during the remove's index
snapshot hangs the remove for good (ENG-30622). The connection retries the JDBC metadata calls that time out during
an elastic join (ENG-30229).
@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-m21 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