Follow-up to #12246, outside the shard io semaphore that #12441 covers.
Expected Behavior
Persistence calls end once a bounded deadline passes.
Actual Behavior
Three background callers pass no per-call deadline, so on a connection that goes silent without a reset they can stay blocked on either driver:
nsregistry.(*registry).refreshNamespaces (starts from context.Background())
ringpop.(*monitor).upsertMyMembership (lifecycle context)
- matching
taskManagerImpl.CreateTasks (WithCancel(Background()))
In my #12246 repro with postgres12_pgx, the matching writer still stalled and workflows stopped. With lib/pq, calls that do have a deadline block too (lib/pq#620).
Steps to Reproduce the Problem
- Run the server against Postgres through HAProxy with a steady workflow load.
- Black-hole established client connections without a reset.
- Dump goroutines after a few minutes.
Specifications
I'd add per-call deadlines to those three callers and a docs note recommending postgres12_pgx for PostgreSQL. OK to send a PR?
Follow-up to #12246, outside the shard io semaphore that #12441 covers.
Expected Behavior
Persistence calls end once a bounded deadline passes.
Actual Behavior
Three background callers pass no per-call deadline, so on a connection that goes silent without a reset they can stay blocked on either driver:
nsregistry.(*registry).refreshNamespaces(starts fromcontext.Background())ringpop.(*monitor).upsertMyMembership(lifecycle context)taskManagerImpl.CreateTasks(WithCancel(Background()))In my #12246 repro with
postgres12_pgx, the matching writer still stalled and workflows stopped. With lib/pq, calls that do have a deadline block too (lib/pq#620).Steps to Reproduce the Problem
Specifications
I'd add per-call deadlines to those three callers and a docs note recommending
postgres12_pgxfor PostgreSQL. OK to send a PR?