Skip to content

Decouple PDP chain handlers from synchronous ChainSched execution #1256

@LexLuthr

Description

@LexLuthr

PDP watchers registered with ChainSched.AddHandler currently run inline on the ChainNotify consumer path. Several of these handlers perform DB polling, DB transactions, and ETH contract reads. If one stalls, ChainNotify stops draining, which can back up the Lotus RPC output buffer and delay unrelated chain-driven work.

Move PDP handlers to an async, coalesced trigger model:

  • ChainSched callback only records the latest head and sends a non-blocking signal.
  • A single thread processes the signal.
  • Process all watchers from this single thread synchronously to avoid incorrect tipset apply.
  • Leave PoRep/window handlers on the existing synchronous path.

This should prevent slow PDP cleanup/delete/settlement/proving scheduling paths from blocking ChainNotify while preserving level-triggered PDP behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    team/fs-wgItems being worked on or tracked by the "FS Working Group". See FilOzone/github-mgmt #10

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions