Skip to content

PGTransport.__init__(timeout=...) is effectively ignored by checkpoint send/recv #323

@wanna-01

Description

@wanna-01

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

  1. Construct PGTransport(pg, timeout=timedelta(seconds=10), ...).
  2. Call send_checkpoint(..., timeout=timedelta(seconds=60)) or recv_checkpoint(..., timeout=timedelta(seconds=60)).
  3. Observe work.wait(...) always uses the per-call timeout argument, not self._timeout.

Suggested fix

Minimal and explicit options:

  1. Remove timeout from PGTransport.__init__ and keep timeout explicit per call.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions