Skip to content

Commit

Permalink
Fix Recovery._resume_streams (faust-streaming#217)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Kerstens <ekerstens@expediagroup.com>
  • Loading branch information
ekerstens and Eric Kerstens authored Nov 17, 2021
1 parent 60a8696 commit e3bd128
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions faust/tables/recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,6 @@ async def _resume_streams(self, generation_id: int = 0) -> None:
app = self.app
consumer = app.consumer
await app.on_rebalance_complete.send()
# Resume partitions and start fetching.
self.log.info("Resuming flow...")
consumer.resume_flow()
app.flow_control.resume()
assignment = consumer.assignment()
if self.app.consumer_generation_id != generation_id:
self.log.warning("Recovery rebalancing again")
Expand All @@ -324,6 +320,10 @@ async def _resume_streams(self, generation_id: int = 0) -> None:
else:
self.log.info("Resuming streams with empty assignment")
self.completed.set()
# Resume partitions and start fetching.
self.log.info("Resuming flow...")
consumer.resume_flow()
app.flow_control.resume()
# finally make sure the fetcher is running.
await cast(_App, app)._fetcher.maybe_start()
self.tables.on_actives_ready()
Expand Down

0 comments on commit e3bd128

Please sign in to comment.