File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,12 @@ class MultiWriterIdGenerator(AbstractStreamIdGenerator):
184
184
185
185
Note: Only works with Postgres.
186
186
187
+ Warning: Streams using this generator start at ID 2, because ID 1 is always assumed
188
+ to have been 'seen as persisted'.
189
+ Unclear if this extant behaviour is desirable for some reason.
190
+ When creating a new sequence for a new stream,
191
+ it will be necessary to use `START WITH 2`.
192
+
187
193
Args:
188
194
db_conn
189
195
db
@@ -269,6 +275,9 @@ def __init__(
269
275
self ._known_persisted_positions : List [int ] = []
270
276
271
277
# The maximum stream ID that we have seen been allocated across any writer.
278
+ # Since this defaults to 1, this means that ID 1 is assumed to have already
279
+ # been 'seen'. In other words, multi-writer streams start at 2.
280
+ # Unclear if this is desirable behaviour.
272
281
self ._max_seen_allocated_stream_id = 1
273
282
274
283
# The maximum position of the local instance. This can be higher than
You can’t perform that action at this time.
0 commit comments