Fix missing _add_persisted_position (#8179)

This was forgotten in #8164.
This commit is contained in:
Erik Johnston 2020-08-27 13:20:34 +01:00 committed by GitHub
parent 30426c7063
commit 5649b7f3d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 52 additions and 3 deletions

View file

@ -343,6 +343,8 @@ class MultiWriterIdGenerator:
curr = self._current_positions.get(self._instance_name, 0)
self._current_positions[self._instance_name] = max(curr, next_id)
self._add_persisted_position(next_id)
def get_current_token(self) -> int:
"""Returns the maximum stream id such that all stream ids less than or
equal to it have been successfully persisted.