mirror of https://github.com/apache/kafka.git
MINOR: KAFKA-2371 follow-up, DistributedHerder should wakeup WorkerGroupMember after assignment to ensure work is started immediately
Author: Ewen Cheslack-Postava <me@ewencp.org> Reviewers: Gwen Shapira Closes #360 from ewencp/minor-kafka-2371-follow-up-wakeup-after-rebalance
This commit is contained in:
parent
9855bb9c65
commit
8838fa8010
|
|
@ -614,6 +614,10 @@ public class DistributedHerder implements Herder, Runnable {
|
|||
log.info("Joined group and got assignment: {}", assignment);
|
||||
DistributedHerder.this.assignment = assignment;
|
||||
rebalanceResolved = false;
|
||||
// We *must* interrupt any poll() call since this could occur when the poll starts, and we might then
|
||||
// sleep in the poll() for a long time. Forcing a wakeup ensures we'll get to process this event in the
|
||||
// main thread.
|
||||
member.wakeup();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -371,6 +371,8 @@ public class DistributedHerderTest {
|
|||
return null;
|
||||
}
|
||||
});
|
||||
member.wakeup();
|
||||
PowerMock.expectLastCall();
|
||||
}
|
||||
|
||||
private void expectPostRebalanceCatchup(final ClusterConfigState readToEndSnapshot) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue