Skip to content

Commit

Permalink
WIP: make sure to consumption the messages till to the last point in …
Browse files Browse the repository at this point in the history
…time of the fetching window. A bunch of messages can arrive at the end of the 5 seconds and we should try to consumption the messages once more before starting consumptioning
  • Loading branch information
eliax1996 committed Aug 23, 2024
1 parent 7f657bd commit 49a9fd2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion karapace/coordinator/schema_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ def are_we_master(self) -> bool | None:
# set the value to `None` since it's expensive to call each time the monotonic clock.
LOG.info("Declaring myself as master since %s are passed!", self._waiting_time_before_acting_as_master_ms)
self._initial_election_sec = None
return True
# this is the last point in time were we wait till to the end of the log queue for new
# incoming messages.
self._ready = False
return False

LOG.info(
"Declaring myself as not master since %s milliseconds are not passed yet",
Expand Down

0 comments on commit 49a9fd2

Please sign in to comment.