Add a get_next_txn method to StreamIdGenerator to match MultiWriterIdGenerator (#15191

This commit is contained in:
Andrew Morgan 2023-03-02 18:27:00 +00:00 committed by GitHub
parent ecbe0ddbe7
commit 1eea662780
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 11 deletions

View file

@ -205,7 +205,7 @@ class LocalSequenceGenerator(SequenceGenerator):
"""
Args:
get_first_callback: a callback which is called on the first call to
get_next_id_txn; should return the curreent maximum id
get_next_id_txn; should return the current maximum id
"""
# the callback. this is cleared after it is called, so that it can be GCed.
self._callback: Optional[GetFirstCallbackType] = get_first_callback