Skip to content

Commit

Permalink
Make clearing rebalance event more obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvanoosten committed Oct 28, 2023
1 parent 9f4b41b commit 1ad29ef
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ private[consumer] final class Runloop private (
s" resuming ${partitionsToFetch} partitions"
)
_ <- currentStateRef.set(state)
_ <- lastRebalanceEvent.set(RebalanceEvent.None)
pollResult <-
consumer.runloopAccess { c =>
ZIO.suspend {
Expand All @@ -317,7 +316,7 @@ private[consumer] final class Runloop private (
tpWithoutData = requestedPartitions -- providedTps
)
} *>
lastRebalanceEvent.get.flatMap {
lastRebalanceEvent.getAndSet(RebalanceEvent.None).flatMap {
case RebalanceEvent(false, _, _, _, _) =>
// The fast track, rebalance listener was not invoked:
// no assignment changes, only new records.
Expand Down

0 comments on commit 1ad29ef

Please sign in to comment.