Summary
PGTransport stores timeout in __init__ (self._timeout), but send_checkpoint / recv_checkpoint use the method argument timeout for all work.wait(...) calls.
In practice, transfer timeout is controlled by the caller (typically Manager._timeout), not by PGTransport(timeout=...).
This creates ambiguous API semantics: constructor-level timeout appears configurable but has no effect for checkpoint transfer.
Expected behavior
If PGTransport accepts a constructor-level timeout, it should either:
- be used as a default timeout in checkpoint transfer paths, or
- be clearly documented as unused/deprecated.
Actual behavior
Constructor timeout is stored but not used in checkpoint transfer wait paths.
Repro
- Construct
PGTransport(pg, timeout=timedelta(seconds=10), ...).
- Call
send_checkpoint(..., timeout=timedelta(seconds=60)) or recv_checkpoint(..., timeout=timedelta(seconds=60)).
- Observe
work.wait(...) always uses the per-call timeout argument, not self._timeout.
Suggested fix
Minimal and explicit options:
- Remove
timeout from PGTransport.__init__ and keep timeout explicit per call.
- Keep both and define/document precedence (e.g. per-call
timeout fallback to self._timeout).
Optional follow-up
Split Manager.timeout into control-path timeout and checkpoint_timeout, since checkpoint transfer latency is often very different from fast RPC/control calls.
Summary
PGTransportstorestimeoutin__init__(self._timeout), butsend_checkpoint/recv_checkpointuse the method argumenttimeoutfor allwork.wait(...)calls.In practice, transfer timeout is controlled by the caller (typically
Manager._timeout), not byPGTransport(timeout=...).This creates ambiguous API semantics: constructor-level timeout appears configurable but has no effect for checkpoint transfer.
Expected behavior
If
PGTransportaccepts a constructor-leveltimeout, it should either:Actual behavior
Constructor timeout is stored but not used in checkpoint transfer wait paths.
Repro
PGTransport(pg, timeout=timedelta(seconds=10), ...).send_checkpoint(..., timeout=timedelta(seconds=60))orrecv_checkpoint(..., timeout=timedelta(seconds=60)).work.wait(...)always uses the per-calltimeoutargument, notself._timeout.Suggested fix
Minimal and explicit options:
timeoutfromPGTransport.__init__and keep timeout explicit per call.timeoutfallback toself._timeout).Optional follow-up
Split
Manager.timeoutinto control-path timeout andcheckpoint_timeout, since checkpoint transfer latency is often very different from fast RPC/control calls.