Skip to content

fix(commit): make observations non-blocking on stuck ops (#2193) - #2197

Draft
FelixFan1992 wants to merge 1 commit into
support/repo-a-2.55-base-newfrom
hotfix/repo-a-2.55-new
Draft

fix(commit): make observations non-blocking on stuck ops (#2193)#2197
FelixFan1992 wants to merge 1 commit into
support/repo-a-2.55-base-newfrom
hotfix/repo-a-2.55-new

Conversation

@FelixFan1992

Copy link
Copy Markdown
Contributor
  • fix(commit): make observations non-blocking on stuck ops
  • Replace the free WaitForAllNoErrOperations (which ended in an unconditional wg.Wait) with a stateful asynclib.Runner whose WaitForAll returns on timeout, so one operation that ignores its context can no longer hang the whole Observation / OCR round.
  • Add a per-operation in-flight guard: an op whose previous invocation is still running is skipped rather than re-spawned, bounding goroutines to the number of distinct ops instead of accumulating one stuck goroutine per round.
  • Return only operations that completed this round; a missing result degrades to its zero value (empty), and a late result from an abandoned goroutine is discarded rather than served, so consensus never acts on stale data.
  • lint

* fix(commit): make observations non-blocking on stuck ops

- Replace the free WaitForAllNoErrOperations (which ended in an
  unconditional wg.Wait) with a stateful asynclib.Runner whose
  WaitForAll returns on timeout, so one operation that ignores its
  context can no longer hang the whole Observation / OCR round.
- Add a per-operation in-flight guard: an op whose previous invocation
  is still running is skipped rather than re-spawned, bounding
  goroutines to the number of distinct ops instead of accumulating one
  stuck goroutine per round.
- Return only operations that completed this round; a missing result
  degrades to its zero value (empty), and a late result from an
  abandoned goroutine is discarded rather than served, so consensus
  never acts on stale data.

* lint
@github-actions

Copy link
Copy Markdown
Metric hotfix/repo-a-2.55-new support/repo-a-2.55-base-new
Coverage 70.2% 69.8%

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