Repository navigation
Description
Delivered in Native 3.3.2 — November 9, 2026
Released and Latest, exact source 660217dd1ac62701eb1fc26b08fbbaf825e777d1, image sha256:4aeceb423ee4c8931f00ec2936149ac6b2a75479243b3930f9c6336ccdebf912. Final cross-repository delivery evidence.
Maintained source: PR#1110: ordered buffered local execution/attempt/history writes, byte/row and whole-completion budget controls, flush barriers and rollback. Source/backend/main checks and published-image compatibility are accepted. Publication/provenance, protected corpus/Compose, default resolution, published PHP and Sample App's full runtime/developer-image follow-through passed on the supported tuple. Both registries' rolling aliases and the full GitHub Release are verified.
General closes this item's delivery criteria as completed. No workload timing or benchmark speedup is inferred. Earlier source/download NONPASSs and original WIP refs remain preserved; the other Native P0s and Cloud adoption retain their separate work.
Original requirement and evidence
External performance report, topic 17. The reported timings and proposed fixes have not been independently reproduced. The supplied patches are reference drafts for review and current-source qualification.
Problem
A five-local-steps completion carries five record_local_activity
commands. For each one, the transaction writes:
- an execution row;
- an attempt row;
- three history events, each with its own sequence allocation and its own
INSERT.
That's about 30 statements under the lock for one completion, about 11 ms
of lock hold on MySQL.
Proposal
record_local_activityholds its rows in the transaction
(Transaction::local_writes).- A run of them is written before any other command applies, and before
commit:- one multi-row INSERT for the executions, and one for the attempts;
- one sequence allocation for each run's events
(last_history_sequence + count); - one multi-row INSERT for the events;
- then each event's projection, exactly as
Store::recordruns it.
- Events keep the payloads, order and sequences they had.
- A run whose sequence can't take them all falls back to one allocation at
a time, and refuses as before. - Bound each multi-row INSERT by bytes as well as rows. Inserts already
go at most 100 rows at a time, but 100 large results in one statement
could pass MySQL'smax_allowed_packet(64 MB by default).
Reported benchmark evidence
Reporter-supplied cumulative measurements, not an isolated-effect or independently verified performance claim: 200 sequentially started workflows, five sequential 20ms activities or five local activities each, six PHP worker processes, mean of three repetitions, one machine, fresh SQLite/MySQL8.0/PostgreSQL16 databases with default durability. "Five" and "local" below mean last-close wall time in seconds; S/M/P means SQLite/MySQL/PostgreSQL. Preserve regressions and noise in the reported results.
Five-local-steps: S / M / P 4.22 / 4.30 / 4.30 → 4.18 / 4.19 / 4.29. MySQL
has the most lock time in this race.
Acceptance
a_long_run_of_local_activity_records_keeps_its_orderpasses. It runs
40 records with a side effect between them, and checks event order,
contiguous sequences, each record's sequence and the activities view.- A test with large results splits the insert under the byte bound.
- The whole-completion persistence budget in workflow#930 still applies
before the first write.
Implementation constraints
The byte bound is mandatory.
Dependencies
No new producer dependency is required for source investigation.
Related existing work: #325, durable-workflow/workflow#930.
Draft patches and validation boundary
Current main was independently read as b8f4dd13623ce645de77ba5bd89ae8dd8eea2f7c. The supplied draft series targets 3d4d4afaf2b24aaa5443eac154e253b011924738; patches are cumulative reference material, not a current-main application or test result. Review and rebase on maintained source, preserve all existing tests and published compatibility, then establish causal controls and actual conformance before shipping. No patch was applied or executed during intake.
Known draft gap / required control: The supplied draft has a row-count limit but does not yet implement the required byte bound. Do not adopt it until large-result controls prove both insert-size limits and the existing whole-completion persistence budget.
The following sanitized unified diffs identify proposed reference material:
0027-t17-Write-a-run-of-local-activity-records-with-one-state.patch— 29,811 bytes, SHA-2563d04e5a0f1b3fa31d8a1a374a634326dc24b426cad58322dd0ea2c5f0d5a1640.
Next action: the owning maintainer reviews the candidate against current source and the acceptance criteria above. Preserve durability, lease/fencing, idempotency, fairness and whole-completion/history budgets. New producer capabilities need versioned schemas and real producer/consumer compatibility proof; historical/frozen evidence is not rewritten.
Activity
rmcdaniel commentedon Nov 6, 2026
Sanitized reference diff
0027-t17-Write-a-run-of-local-activity-records-with-one-state.patch, part 1/1.This is an unverified, cumulative draft from the external report. Mail author/date/commit-message metadata was removed; the unified-diff hunks were retained. No patch was applied or executed, and no build/test or compatibility result is implied. The known gaps and acceptance criteria in this issue remain mandatory.
Complete sanitized patch: 29,811 bytes, SHA-256
3d04e5a0f1b3fa31d8a1a374a634326dc24b426cad58322dd0ea2c5f0d5a1640. This part: 29,811 bytes, SHA-2563d04e5a0f1b3fa31d8a1a374a634326dc24b426cad58322dd0ea2c5f0d5a1640. Parts concatenate in order; a part boundary is between complete file diffs.rmcdaniel commentedon Nov 6, 2026
Sanitized rebased reference for report topic 17:
0027-t17-Write-a-run-of-local-activity-records-with-one-state.patch.The supplied revision targets Server
b8f4dd13623ce645de77ba5bd89ae8dd8eea2f7c. It is cumulative external reference material, not independently qualified against today's maintained source. Mail headers and commit-message/application instructions were removed; the unified diff is retained. The reporter now claims every rebased commit builds and the tip passes SQLite/MySQL/PostgreSQL tests. Those are attributed claims, not a new maintainer test result. Existing acceptance criteria, security findings and completed implementation receipts remain authoritative. Earlier attached patches are retained as historical references.Sanitized patch: 29,811 bytes, SHA-256
cb8670bef17cb6ac772b21bd7ba7d44dcafc8076c804e3a7b1480d9eceaf4f90. Original-base sanitized identity:3d04e5a0f1b3fa31d8a1a374a634326dc24b426cad58322dd0ea2c5f0d5a1640. No patch was applied or executed during this update.rmcdaniel commentedon Nov 8, 2026
Operator nudge: this benchmax ticket (P0) has had no linked PR and no activity for about 32 h. Please pick it up next, after the current work on #1057. Suggested order for the stalled server tickets: #1063, #1068, #1075, #1077, #1078, #1079, then #1081 (P2); this one is 2 of 7. Open a draft PR as soon as work starts so the tracker shows it. If it is blocked, add the status:blocked label with a one-line reason.
rmcdaniel commentedon Nov 9, 2026
General has started the maintained-source implementation for this P0, independently of the frozen3.3.1 release cut. The original WIP refs remain preserved.
The reference draft does not apply to current backend/store/transaction code. Its local-record and order-test hunks have been imported into a separate worktree and are being ported. The new range allocator keeps the existing single-event allocator and typed fallback; pending rows flush at command/checkpoint/history-read/commit boundaries. Multi-row writes now have both the100-row limit and a1MiB conservative encoded-size target. A previously legal oversized single row stays a single-row write.
Next: physical statement-count controls, large-result splitting and oversized-row coverage, sequence-boundary/fallback equivalence, and the unchanged whole-completion persistence-budget refusal/rollback behavior. Then a coherent draft PR and normal hosted compile/conformance. No code has been compiled or pushed yet, and this work is not in3.3.1 or a benchmark result.
rmcdaniel commentedon Nov 9, 2026
General selects one ordinary draft source train for #1068's maintained-source batching implementation. #1109 has merged; its subject-only main checks remain under observation. There is one new heavy source train, with no P0 queue or release selected.
Head
514dfcdabd316870afeea275fff82e7a3bfec5b9, sole parent/current main603f9f5cbf4684fc3fba7dbf20b4ee115fe40453, tree3d69cdac3ab5480b2cd526ef3f89bcc95f463c8d. Eleven Rust files,536additions/23deletions; full binary delta 49041B / SHA-256043f24bfcb6ea8dccde0d526ec3b768ee5f9a47a604d448f24270ccff135f29e. The rebase over the runner-subject merge is byte-identical in its Rust delta. Preserved operator WIP refs are untouched.Implementation: hold local execution/attempt/history rows; flush before other commands, history-dependent scope reads, poll savepoints and commit; discard held state on rollback. Multi-row statements have100-row and conservative1MiB encoded-size bounds. A legal oversized single row stays a single-row write. A separate range allocator retains backend counter limits, SQLite canonical-type protection and the unchanged single-event typed fallback. Logical completion-budget charges remain unchanged.
Added controls:40-record order with a side effect; physical execution/attempt/history INSERT and range counts; large-result byte splitting; oversized legal rows; event/row/byte budget refusal before local writes with the claim usable; range-boundary, missing/noncanonical and zero-count controls. Existing retry/heartbeat/failure and full source corpus coverage remain.
Only source/whitespace/secret/ancestry checks ran here. Uncompiled and unexecuted locally; normal hosted CI is the first compile and database execution. One must-be-absent branch push and agent:general draft PR. Refuse main/head/diff drift, existing branch/PR or a secret finding. Observe all checks, including SQLite, PG, MySQL and MariaDB. Preserve any NONPASS; no automatic rerun, cancellation or successor push. This is for a later patch, with no benchmark speedup or3.3.1-content claim.