KAFKA-10739; Replace EpochEndOffset with automated protocol#9630
KAFKA-10739; Replace EpochEndOffset with automated protocol#9630dajac merged 14 commits intoapache:trunkfrom
Conversation
chia7712
left a comment
There was a problem hiding this comment.
overall +1. Three minor questions are left.
Also, there are a lot of data structure like Map[TopicPartition, OffsetForLeaderPartitionResult]. It contains duplicate (int) partition info. Not sure whether
it is worth replacing it by Map[String,List[OffsetForLeaderPartitionResult]] to eliminate duplicate partition info. It will bring a bunch of changes :(
Yeah, I considered this actually. Finally, I went with keeping TopicPartition as a key mainly because TopicPartition is required by most of the callers. |
hachikuji
left a comment
There was a problem hiding this comment.
Nice improvement. Left a couple small comments.
|
@hachikuji Thanks for your feedback. I have addressed your points. |
hachikuji
left a comment
There was a problem hiding this comment.
Thanks for the updates. LGTM. Just a minor comment you can consider (no need for re-review).
…n Partition and change all the related usages
|
I just rebased the PR cause it had conflicts with 7ecc3a5. |
|
Test failure is unrelated:
|
…t-for-generated-requests * apache-github/trunk: MINOR: Fix flaky test shouldQueryOnlyActivePartitionStoresByDefault (apache#9681) KAFKA-10799 AlterIsr utilizes ReplicaManager ISR metrics (apache#9677) MINOR: Fix KTable-KTable foreign-key join example (apache#9683) KAFKA-10473: Add docs on partition size-on-disk, and other log-related metrics (apache#9276) KAFKA-10739; Replace EpochEndOffset with automated protocol (apache#9630) KAFKA-10460: ReplicaListValidator format checking is incomplete (apache#9326) KAFKA-10554; Perform follower truncation based on diverging epochs in Fetch response (apache#9382) MINOR: Align the UID inside/outside container (apache#9652) KAFKA-10794 Replica leader election is too slow in the case of too many partitions (apache#9675) KAFKA-10090 Misleading warnings: The configuration was supplied but i… (apache#8826) clients/src/main/java/org/apache/kafka/common/requests/OffsetsForLeaderEpochResponse.java clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetcherTest.java core/src/test/scala/unit/kafka/server/epoch/util/ReplicaFetcherMockBlockingSend.scala
This patch follows up #9547. It refactors KafkaApis, ReplicaManager and Partition to use
OffsetForLeaderPartitionResultinstead ofEpochEndOffset. In the mean time, it removesOffsetsForLeaderEpochRequest#epochsByTopicPartitionandOffsetsForLeaderEpochResponse#responsesand replaces their usages to use the automated protocol directly. Finally, it removes old constructors inOffsetsForLeaderEpochResponse. The patch relies on existing tests.Committer Checklist (excluded from commit message)