Skip to content

ENG-30396: STREAMS oracle, export, and the fixes lab builds #41-#45 needed (milestone 29) - #28

Closed
jwiebema1 wants to merge 10 commits into
ENG-30396-sqlancer-m28from
ENG-30396-sqlancer-m29
Closed

jwiebema1 wants to merge 10 commits into
ENG-30396-sqlancer-m28from
ENG-30396-sqlancer-m29

Conversation

@jwiebema1

@jwiebema1 jwiebema1 commented Nov 10, 2026 •

Copy link
Copy Markdown

Milestone 29 of ENG-30396 (tracked in ENG-30581, epic ENG-30580 "SQL Housekeeping"): streams, their materialized views and export, through the STREAMS oracle; and what lab builds #41 to #44 found in milestones 21 to 28. Stacked on #27 (milestone 28), which is stacked on #26 to #21 and #20 to #1; review those first.

The nightly job's k=2 run exports once VoltDB/internal#6404 is merged; VoltDB/pro#7125 gives run-jenkins-sqlancer-test.sh the run shape.

Why

A stream cannot be read. What goes in comes out only through its materialized views and its export target, so the other oracles never see either. STREAMS checks both against a table that holds the same rows.

What it changes

STREAMS and export

  • STREAMS (oracle/VoltDBStreamOracle) puts each row into a stream (XS_<db>_ST, partitioned on k) and into a shadow table with the same columns (_SH). The stream's view (_SV, a GROUP BY k, s) must then hold what the same GROUP BY over the shadow table returns.
    • The objects are named outside the database's own names and kept for the run: a stream dropped with rows still to export may lose them.
    • At exit STREAMS prints the rows it inserted and the views it compared.
  • run-sqlancer.sh --export: a file export target (sqlancer, CSV), and the provider gets --export-target sqlancer, so the streams export to it.
    • When SQLancer stops, the script runs @Quiesce and shuts the cluster down gracefully, which closes the export files.
    • It then counts the distinct rows in them, which must equal the rows STREAMS inserted. Export is at least once, so a duplicate counts once, and the summary reports how many there were.
    • Each node writes into its own voltdbroot/sqlancer_export (a relative outdir). In one shared directory, two nodes exporting the same stream in the same second name the same file, and the target loops on it (ENG-30629 below).
  • A server log over 256 MB is a server logging without end, and would fill the agent's disk. Its copy keeps the first and last 64 MB and the FATAL lines between, and the run fails.

What the lab found in earlier milestones

Bugs found

Ticket Issue Workaround while --avoid-known-bugs is true
ENG-30630 XDCR: one cluster drops and recreates a DR table (here replicated, where it was partitioned), and the other then writes rows into its old one. The first pauses the DR stream on the mismatched schema ("Received binary log with schema that doesn't match local catalog. Pausing this DR stream"). Once the other has recreated the table too and the catalogs match, the stream stays paused for good: nothing more replicates in that direction, not even a new table's rows, while DRROLE says ACTIVE. Also on 16.0.0. Found by lab build #43's XDCR run, bisected and caught live locally. Critical. Reproduction: voltdb/repros/ENG-30630.sh. Wait for XDCR to apply what is queued before dropping a reused name's tables.
ENG-30629 When the file export target's output file name is taken, it logs "... ExportToFileClient will stop to prevent data loss" but does not stop. It retries the block at once, for good, with a stack trace each time (about 15,000 a second), and the block's rows are never exported. Also on 16.0.0. Found by #43, whose three nodes wrote 48 to 68 GB of volt.log each in 45 minutes, until the disk was full. Critical. Reproduction: voltdb/repros/ENG-30629.sh. Each node exports into its own voltdbroot; server logs over 256 MB fail the run.
ENG-30628 A LEFT JOIN of a partitioned table whose WHERE clause compares a scalar subquery with its primary key fails to plan (IllegalStateException in SubPlanAssembler). Also on 16.0.0. Found by #41's upgrade run. Reproduction: voltdb/repros/ENG-30628.sql. No scalar subqueries with an outer join.

Testing

… 29: export streams)

STREAMS puts each row into a stream and a shadow table and checks the stream's materialized view against the same
GROUP BY over the shadow table. With --export the streams export to a file target, and after @Quiesce and a graceful
shutdown the script checks that the files hold every row the streams got (distinct rows: export is at least once).
…anner fails on one compared with a partitioned table's key; lab build #41), and its reproduction
… (sqlcmd's PATH note), the license for the script reproductions, and time for a crashing server to exit (lab build #42)
…it (ENG-30595 on the lab's Linux agents), and a -- platforms: header; ENG-30551 reproduces on macOS only (lab builds #42 and #43)
…gs over 256 MB are cut and fail the run (ENG-30629: lab build #43's shared outdir made the file target loop, 60 GB of volt.log per node), and its reproduction
…s streams have no export target but with --export, and VoltDB will not resize while one may hold rows; lab build #43)
…rejoin is in progress" (an in-service upgrade's node still rejoining; lab build #43)
…y what is queued before it drops the old tables (ENG-30630: rows for a dropped and recreated DR table pause the stream for good; lab build #43's XDCR run stalled), and its reproduction
…mp, if it has not exited 15 minutes after its duration, and fails the run (lab build #44's first run never ended)
…eam out of step, and an out-of-step stream that exports nowhere starts afresh (lab build #44's kill run: the stream got a row its shadow did not)
@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-m29 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