Repository navigation
refactor(global-db): run more registered writes as job transactions - #4321
Open
ScriptedAlchemy wants to merge 12 commits into
Open
ScriptedAlchemy wants to merge 12 commits into
ScriptedAlchemy wants to merge 12 commits into
Conversation
|
ScriptedAlchemy
enabled auto-merge
October 18, 2026 16:36
ScriptedAlchemy
disabled auto-merge
October 18, 2026 21:44
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #4099 (storage redesign, cutover step 5, slice 5i-4). Does not close it.
What changes
About twenty more global-db interactive write transactions now run as
RegisteredGlobalDb::transactjobs, so each is one bounded writer job instead of a held transaction.transact_or(wrap, body)maps a refused or failed job to the site's own error type.transact_or_rollback(wrap, body)withJobExit::{Rollback, Fail}lets a body end early with a value the caller wants as success (a replayed append). The job rolls back, so a replay leaves no commit.transact_configandtransact_rollupnow usetransact_or.&impl Executoror&impl QueryExecutor, so the same body serves the job and the sites still on interactive transactions.WorkflowIngestWriteTxn(sessions trait) and its global-db impl are deleted; nothing used them after the workflow adapter moved.Bodies are
Fn; each site clones what it owns into the closure and none has an effect outside storage.Left for a later slice
apply_registry_gcreads outside the transaction while holding it.relink_orphan_store_instancehas a manifest file effect between the SQL and the commit.claim_and_settle_observability_emissionstakes anFnMutthat allocates producer sequences; a re-run would allocate twice.append_analytics_eventuses the writer connection, not an interactive transaction.Evidence
tests.rsnext to the 5i-3 job tests:transact_or_rollback_keeps_an_early_value_but_never_a_commit,transact_or_wraps_a_scope_that_ended_mid_body_and_rolls_back,converted_write_is_refused_without_a_write_scope.analytics_import_cursor_failure_rolls_back_eventsandanalytics_import_cursor_conflict_rolls_back_events, plus the stack delivery, settlement, source rewrite and outbox suites.unit_testandregistered_schema_fail_closed, sessionsunit_test,//crates/tracedecay:unit_test,:daemon_suite,:mcp_suite,:session_suiteall pass;--config=clippyon global-db and sessions clean;rustfmt_check_2024passes for both.