docs(server): record why the review-participant recovery insert leaves responsibleUserId null
Add a comment above the heartbeat_runs insert in queueReviewParticipantRecoveryRun. It states that claimQueuedRun and initializeRunIdentity set the value later, that no code reads it on a queued row, and that resolving it here would add a throw inside the release transaction that runs the review-recovery path. Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
0bff1d5cb6
commit
0b81bda287
|
|
@ -453,6 +453,13 @@ function buildTransaction(tx: Db, deps: WakeQueuePostgresAdapterDeps): WakeQueue
|
|||
.returning()
|
||||
.then((rows) => rows[0]);
|
||||
|
||||
// This insert does not set responsibleUserId. claimQueuedRun resolves the
|
||||
// responsible user and writes it in the same update that moves the run
|
||||
// from "queued" to "running", and initializeRunIdentity then overwrites
|
||||
// it again from the run identity chain. No code reads responsibleUserId
|
||||
// on a queued row. Resolving the responsible user here, like the other
|
||||
// recovery writers do, would add a throw inside this release transaction
|
||||
// — on the one path whose job is to un-stick a stalled review.
|
||||
const queuedRun = await tx
|
||||
.insert(heartbeatRuns)
|
||||
.values({
|
||||
|
|
|
|||
Loading…
Reference in New Issue