-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-18555: Avoid casting MetadataCache to KRaftMetadataCache #18632
Changes from 10 commits
0f3d5c5
333bbc1
32e0d48
5858144
dd31568
5b3f501
69b9b19
755c781
c8c1ccd
67936d7
ac6c9b2
4206047
2f42b87
8ea7746
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -348,6 +348,7 @@ class PartitionLockTest extends Logging { | |||||||||||||||||||||||
val controllerEpoch = 0 | ||||||||||||||||||||||||
val replicas = (0 to numReplicaFetchers).map(i => Integer.valueOf(brokerId + i)).toList.asJava | ||||||||||||||||||||||||
val isr = replicas | ||||||||||||||||||||||||
replicas.forEach(replicaId => when(metadataCache.getAliveBrokerEpoch(replicaId)).thenReturn(Some(1L))) | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this extra code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use
kafka/core/src/main/scala/kafka/cluster/Replica.scala Lines 116 to 125 in 94a1bfb
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
assertTrue(partition.makeLeader(new LeaderAndIsrRequest.PartitionState() | ||||||||||||||||||||||||
.setControllerEpoch(controllerEpoch) | ||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this scaladoc to the interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FrankYang0529 Could you please remove those comments as you have moved them to the interface