Repository navigation
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
czpython
force-pushed
the
paulo/queue-a-run-after-its-transaction-commits
branch
from
November 7, 2026 10:18
b82aec2 to
5f340e4
Compare
czpython
force-pushed
the
paulo/queue-a-run-after-its-transaction-commits
branch
from
November 7, 2026 10:24
5f340e4 to
0de10d7
Compare
czpython
force-pushed
the
paulo/queue-a-run-after-its-transaction-commits
branch
from
November 7, 2026 16:22
0de10d7 to
d772647
Compare
This branch was successfully 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.
Outside a workflow (a request, a webhook, a command),
Workflow.start()enqueues the run in the caller's transaction through DBOS'sDBOSClient.enqueue_in_transaction, so the run, its row, and itsworkflow.scheduledevent commit together, and a rollback leaves none of them. Before,start()enqueued in DBOS's own transaction at once, so a request that failed after the start kept a run whose subject row was gone.start()keepsDBOS.enqueue_workflow_async, which DBOS records as the workflow's child: a replay finds the run, and runs in flight at deploy recover as before.DBOS.workflow_idpicks the path.druks.durable.engine.enqueue_in_transactionruns the client call in a savepoint. A held deduplication slot raisesDBOSQueueDeduplicatedError; the savepoint drops the collision, and the call returns the holder fromworkflow_status, or claims the slot again when the holder ended in between. The client stamps the attributes and serializes the input as an in-process enqueue does.Run.create_rowtakes the caller's session._execute_runandRun.retrywrite their rows through sessions of their own, as before.workflow_statushandle readsqueue_nameanddeduplication_id, and its grace comment no longer says the row commits before the enqueue.docs/writing-an-app.mdgives the rule beside the duplicate-start rule. Two tests cover a start that rolls back and a second start in the same transaction, and the failed-enqueue test now fails the in-transaction enqueue.