Skip to content

Require a transaction for pilot insertion - #1431

Draft
bgentry wants to merge 1 commit into
masterfrom
bg/pilot-insert-transaction
Draft

bgentry wants to merge 1 commit into
masterfrom
bg/pilot-insert-transaction

Conversation

@bgentry

@bgentry bgentry commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

The internal pilot insertion method currently accepts a general executor even though its callers already supply a transaction. This PR changes Pilot.JobInsertMany to accept riverdriver.ExecutorTx and documents that the caller owns commit and rollback and that related writes belong in the supplied transaction.

The standard pilot and client spy adopt the signature, with coverage for preserving caller ownership on both success and error. Public insertion APIs and the other pilot method contracts retain their current behavior.

Pilot insertion callers already supply a transaction, but the internal
interface also accepts pool executors. Require `ExecutorTx` to express
that existing contract and document caller ownership of commit and
rollback and the transaction used for related writes.

Update the standard pilot and client spy. Cover insertion success and
errors without opening, committing, or rolling back another transaction.
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.

2 participants