mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-12 23:42:13 -04:00
Start application service stream token tracking from 1 (#12193)
Co-authored-by: Erik Johnston <erik@matrix.org>
This commit is contained in:
parent
9b67715bc3
commit
c8cbd66d3b
4 changed files with 6 additions and 4 deletions
|
@ -446,7 +446,8 @@ class ApplicationServiceTransactionWorkerStore(
|
|||
)
|
||||
last_stream_id = txn.fetchone()
|
||||
if last_stream_id is None or last_stream_id[0] is None: # no row exists
|
||||
return 0
|
||||
# Stream tokens always start from 1, to avoid foot guns around `0` being falsey.
|
||||
return 1
|
||||
else:
|
||||
return int(last_stream_id[0])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue