lizhimins opened a new pull request, #162: URL: https://github.com/apache/rocketmq-flink/pull/162
Fixes #161 ## What is the purpose of the change Two gaps remained in periodic partition discovery after #152: 1. **Partial route-fetch failure across multiple topics still revoked the failed topic's queues.** `requestServiceDiscovery` only skipped the round when *every* topic failed; on a partial failure the plain set difference against `allocatedSet` reported the failed topic's queues as decreased (stop-splits + full re-load-balance), and the recovery round re-initialized them. A failed fetch says nothing about the route. 2. **A revoked queue that reappeared restarted from the configured starting selector.** `initializeSourceSplits` discarded the `checkedOffsets` entry on decrease, so a re-added queue (broker rolling restart, scale-down then scale-up, or the recovery phase of gap 1) was re-resolved — with `earliest`, replaying the whole queue from offset 0. ## Brief changelog - The discovery callable now returns a `ServiceDiscoveryResult` (discovered queues + failed topics); `getSourceChangeResult` removes queues of failed topics from `decreaseSet` before acting on the change result. Increase handling is unchanged. - On decrease, the last checkpointed offset of a revoked queue is retained (`revokedQueueOffsets`, only meaningful offsets `>= 0`); on increase, that offset is preferred over the selector — the same rule the migration path already applies to surviving queues. The selector still applies to genuinely new queues. The retained offsets are coordinator-local (no enumerator state format change); after failover the selector applies again. ## Verifying this change - `RocketMQSourceEnumeratorDiscoveryToleranceTest`: per-topic exclusion on partial failures at both the handler level (assignment untouched) and the diff level (genuine deletions on successfully fetched topics still reported), plus the existing whole-round guards. - New `RocketMQSourceEnumeratorRevokedOffsetResumeTest`: checkpoint resume on re-add, new-queue selector fallback, mixed re-added/new rounds, and the `NO_STOPPING_OFFSET` guard. - `mvn clean package` (JDK 17) green across all five modules; `spotless:apply` run on JDK 11 as in CI. ## Does this pull request potentially affect one of the following parts - Dependencies (does it add or upgrade a dependency): **no** - The public API (i.e., is any changed class annotated with `@Public(Evolving)`): **no** - The serializers: **no** - The runtime per-record code paths (performance sensitive): **no** - Anything that affects deployment or recovery (Yarn / Mesos / Kubernetes components): **no** -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
