This repository was archived by the owner on Nov 21, 2026. It is now read-only.
Repository navigation
bench: the restart lane reattaches PostgreSQL with autocommit on, so its write batch is committed - #330
Merged
Conversation
…its write batch is committed PostgresTPC.connect() opens with autocommit off and only build() turns it on; Docs.reattach() made a fresh adapter after each restart and never ran build(), so the 1000 writes of a cycle sat in one open transaction that the stop rolled back, and verify() failed the cell as an engine losing committed writes (qP24 on mini, 2026-10-18). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The restart lane failed PostgreSQL's documents cell on the bench host with "cycle 0's 1000 committed writes were not back 300 s after a clean stop and restart". The writes were never committed:
PostgresTPC.connect()opens with autocommit off and onlybuild()turns it on after its final commit, whileDocs.reattach()builds a fresh adapter after each restart and never runsbuild(). So the cycle's 1,000 single-record inserts sat in one open transaction that the stop rolled back, andverify()blamed the engine.The fix turns autocommit on in
Docs.reattach()for postgres, the statebuild()leaves. The documents lane's adapter (l1_tpc.PostgresTPC) is not changed.What ran:
synchronous_commit=off, indbbench:client): build's end state,reattach(),write(0), a cleandocker restart,verify(0). Before: autocommit after reattach False, verify False. After: True, True.test_l6_restart_reattach.py(2 tests: postgres gets autocommit, another backend is left asconnect()made it).benchmarks/experimentssuite: 850 passed, 19 skipped.The two pass-1 PostgreSQL restart cells re-run with the fix (tpch10 picks it up on the bench host before it starts; tpch1 goes into the deferred stage).
🤖 Generated with Claude Code