Skip to content

logpuller: split event sink, failure handling, and span lifecycle out of subscription client #5604

Description

@lidezhu

subscription_client.go currently owns too many responsibilities: event delivery to dynstream, region failure recovery, subscribed-span lifecycle, resolve-lock checking, and slow-region monitoring.

This makes the log puller runtime hard to read, hard to test, and harder to split follow-up changes safely.

We should extract these responsibilities into dedicated components:

  • regionEventSink for dynstream push/wake/feedback handling
  • regionFailureHandler for region error buffering and retry/reschedule logic
  • spanRegistry for subscribed span state, resolve-lock checking, slow-region logging, and related metrics

The goal of this change is structural only:

  • keep existing behavior unchanged
  • reduce the size and responsibility of subscription_client.go
  • make later scheduler/defer refactoring easier and safer

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-8.5This bug affects the 8.5.x(LTS) versions.type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Fields

    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