Skip to content

ENG-30396: the HTTP export target's modes, form by POST/PUT/GET, signed, and CSV batches (milestone 47) - #46

Closed
jwiebema1 wants to merge 3 commits into
ENG-30396-sqlancer-m46from
ENG-30396-sqlancer-m47
Closed

jwiebema1 wants to merge 3 commits into
ENG-30396-sqlancer-m46from
ENG-30396-sqlancer-m47

Conversation

@jwiebema1

@jwiebema1 jwiebema1 commented Nov 14, 2026 •

Copy link
Copy Markdown

Why

Milestone 45's coverage run found most of the HTTP export client never run: HttpExportDecoder 57 of 245 lines, HttpExportClient 115 of 260. The target only ever sent one row per POST, unsigned.

What it changes

  • run-sqlancer.sh --http-mode form|signed|batch sets how the HTTP target sends rows. Unless --http-mode is given, the mode comes from the seed, and the method always does.
    • form: one row per request as form pairs, by POST, PUT or GET.
    • signed: the same, signed with HmacSHA1 or HmacSHA256.
    • batch: batch.mode with type csv and period 10s, by POST or PUT, to /%t/%p/%g.
  • voltdb/http-receiver.py handles every mode.
    • Signatures: it computes each request's signature itself (over the method, host, path and the sorted pairs as sent). A request that doesn't match is refused with 403 and recorded as a BADSIG line, which fails the run.
    • Batches: it writes each CSV line as a row.
  • The end count is unchanged: every inserted row must arrive, none twice. In batch mode the run waits after @Quiesce until the receiver's rows stop changing for 25 s.
  • The manifest and summary name the mode and the method.
  • run-coverage.sh: the export run uses signed, and a new batch run (3 nodes, k=1, no kills) uses batch.
  • README: an "HTTP target modes" section, and the status now says milestone 47.

Bugs found

  • ENG-30694 (Blocker, a hang): in batch mode the client calls getURI().getQuery().contains("op=APPEND") after sending each batch. With an endpoint that has no query string, that is a NullPointerException. The client sends the batch again on every retry, and the stream never exports another row. In a reproduction (1 node, PUT, period 5s), the first row arrived 17 times and the second never. repros/ENG-30694.sh reproduces it. While avoiding known bugs, the batch endpoint has a query string (?sqlancer=1).

Coverage (run-coverage.sh, 10-minute export and batch runs)

Class or area Milestone 45 Milestone 47
HttpExportClient 115 of 260 155 of 260
HttpExportDecoder 57 of 245 85 of 245
Export and streams, lines 33.0% 35.2%

Testing

  • Local, 1 node, 3 minutes each, with every target's rows counted and none twice:
    • signed by GET with HmacSHA1: 1,513 rows;
    • batch by PUT: 1,444 rows;
    • form by POST: 1,556 rows.
  • Local batch with kills (3 nodes, k=2, a kill a minute, 7 minutes): 3,355 of 3,355 rows, with 7 gap fills, 5 kills and 5 rejoins.
  • Coverage runs:
    • Export run, signed by POST, a kill every 66 s: 658 rows, 6 kills and 6 rejoins, no bad signature.
    • Batch run by PUT: 1,088 rows.
    • An earlier attempt at the export run lost a node to an unrelated server crash, a SIGSEGV in ~MaterializedViewHandler during a truncation snapshot that spanned DDL. It is not reduced yet.
  • Lab: build Add a Travis check for Postgres sqlancer/sqlancer#60 of matrix-systemtest-apprunner-sqlancer (branch job ENG-30396-sqlancer-nightly, a replay) ran fork 8c08f76 against 16.1.0-SNAPSHOT (master kit 400). It made two export runs (3 nodes, k=2, a kill every 300 s, 45 minutes, all thirty-two oracles), with seed 202611140002 so that the first is signed and the second batch. Both passed:
    • Signed (HmacSHA256, by POST): 4,523 of 4,523 rows exported (1,099 through HTTP, 1,269 through JDBC), none twice, no bad signature; 3 gap fills; 8 kills, 8 rejoins.
    • Batch (by PUT): 4,734 of 4,734 rows (1,261 through HTTP, 1,130 through JDBC), none twice; 8 kills, 8 rejoins.

After the lab run

d9114c8 names the tickets filed since: ENG-30694 here, ENG-30695 (milestone 46) and ENG-30696 (milestone 43, in VoltDBErrors). It adds repros/ENG-30694.sh and repros/ENG-30695.sh, both reported BROKEN by run-repros.sh, and a README table of the three. No behaviour changes.

…T, signed, CSV batches)

Milestone 45's coverage run found most of the HTTP export client never run
(HttpExportDecoder 57 of 245 lines): one row per POST, unsigned.
run-sqlancer.sh --http-mode form|signed|batch (from the seed unless given,
as is the method) configures the target: form pairs by POST, PUT or GET;
signed with HmacSHA1 or HmacSHA256, which http-receiver.py checks (a bad
signature is a BADSIG line and fails the run); or CSV batches every 10 s to
/%t/%p/%g by POST or PUT, which the receiver writes row by row, and which the
run awaits after @Quiesce. The manifest and summary name the mode and method.
run-coverage.sh's export run is signed, and a new batch run uses batch.

BATCH_HTTP_BUG (to be filed): in batch mode the client calls
getQuery().contains() on the endpoint, and with no query string it fails
every batch after sending it and sends it again for good. While avoiding
known bugs the batch endpoint has a query string.
@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-m47 branch November 25, 2026 13:45
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