Skip to content

fix(connector): drain kafka enumerator events during meta split discovery (#25405)#25406

Open
tabVersion wants to merge 1 commit intorelease-2.8from
backport-release-2.8-kafka-enumerator-poll
Open

fix(connector): drain kafka enumerator events during meta split discovery (#25405)#25406
tabVersion wants to merge 1 commit intorelease-2.8from
backport-release-2.8-kafka-enumerator-poll

Conversation

@tabVersion
Copy link
Copy Markdown
Contributor

Summary

Backport the meta-side Kafka enumerator polling fix to release-2.8.

This keeps the KafkaSplitEnumerator's BaseConsumer from leaving queued librdkafka callbacks unserved during meta's periodic split discovery when statistics.interval.ms is enabled.

What changed

  • poll the Kafka enumerator client once at the start of list_splits()
  • only log tracing::warn! when that poll returns Some(Err(_))
  • keep split discovery behavior unchanged otherwise

Why backport

Meta on the release branch uses the same long-lived Kafka split enumerator path in source manager, so the same callback-queue pressure applies there.

Validation

  • rustfmt --edition 2024 src/connector/src/source/kafka/enumerator.rs
  • cargo check -p risingwave_connector --lib --quiet

Meta's Kafka split enumerator uses BaseConsumer, so source-manager ticks can accumulate queued
librdkafka callbacks when statistics reporting is enabled. Poll once at the start of list_splits
and warn on explicit poll errors while keeping split discovery on its existing happy path.

Constraint: Keep the fix minimal and meta-scoped to the enumerator path
Rejected: Add a dedicated background poll loop | larger lifecycle change for a targeted mitigation
Confidence: medium
Scope-risk: narrow
Reversibility: clean
Directive: If queued event pressure persists, revisit the shared consumer cache key and enumerator polling model
Tested: rustfmt --edition 2024 src/connector/src/source/kafka/enumerator.rs; cargo check -p risingwave_connector --lib --quiet
Not-tested: Runtime validation against a real Kafka broker with statistics.interval.ms enabled
@github-actions github-actions bot added the type/fix Type: Bug fix. Only for pull requests. label Apr 17, 2026
@tabVersion tabVersion changed the title fix(connector): drain kafka enumerator events during meta split discovery fix(connector): drain kafka enumerator events during meta split discovery (#25405) Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/fix Type: Bug fix. Only for pull requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant