Skip to content

Fix DoCheckin not retrying transient database errors (#2314)#2970

Merged
lahma merged 1 commit into
3.xfrom
fix/docheckin-transient-retry
Mar 31, 2026
Merged

Fix DoCheckin not retrying transient database errors (#2314)#2970
lahma merged 1 commit into
3.xfrom
fix/docheckin-transient-retry

Conversation

@lahma

@lahma lahma commented Mar 31, 2026

Copy link
Copy Markdown
Member

Summary

  • Add transient retry loop to DoCheckin in JobStoreSupport, matching the existing ExecuteInNonManagedTXLock pattern (uses MaxTransientRetries, TransientRetryInterval, IsTransient())
  • Fix ClusterCheckIn setting LastCheckin before the DB write succeeds — now only advances after commit, preventing stale in-memory timestamps on failure
  • Add 4 unit tests covering retry, non-transient propagation, max-retry exhaustion, and LastCheckin correctness

Closes #2314

Test plan

  • dotnet test --filter "FullyQualifiedName~DoCheckin" — 4 new tests pass
  • dotnet test --filter "FullyQualifiedName~TriggersFired" — 7 existing tests still pass
  • Verify with a real clustered PostgreSQL setup that transient timeouts during check-in are retried

🤖 Generated with Claude Code

DoCheckin was the only major DB operation path without transient retry
logic. A transient error (e.g. Npgsql timeout) during cluster check-in
would fail immediately, causing stale DB timestamps and potential false
failure detection by other cluster nodes.

Add retry loop matching ExecuteInNonManagedTXLock pattern, and fix
ClusterCheckIn setting LastCheckin before the DB write succeeds.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@lahma
lahma merged commit cf6b31d into 3.x Mar 31, 2026
15 checks passed
@lahma
lahma deleted the fix/docheckin-transient-retry branch March 31, 2026 20:50
This was referenced Apr 3, 2026
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.

1 participant