cmccabe commented on a change in pull request #10069:
URL: https://github.com/apache/kafka/pull/10069#discussion_r573328630
##########
File path: core/src/main/scala/kafka/server/ReplicaManager.scala
##########
@@ -185,7 +185,9 @@ object HostedPartition {
* This state only applies to brokers that are using a Raft-based metadata
* quorum; it never happens when using ZooKeeper.
*/
- final case class Deferred(partition: Partition) extends NonOffline
+ final case class Deferred(partition: Partition,
+ isNew: Boolean,
+ onLeadershipChange: (Iterable[Partition],
Iterable[Partition]) => Unit) extends NonOffline
Review comment:
I don't think this callback is logically part of the HostedPartition
object itself. We don't want a different callback for each partition. It will
the same one for each (in practice it just hooks into the group manager and one
other manager that I forget). So let's just supply this callback in whatever
function it is needed in, not store it in the hostedpartition object.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]