Correctly increment the _next_id initially
parent
86fc9b617c
commit
3c741682e5
|
@ -55,9 +55,11 @@ class IdGenerator(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
val, = txn.fetchone()
|
val, = txn.fetchone()
|
||||||
self._next_id = val or 2
|
cur = val or 0
|
||||||
|
cur += 1
|
||||||
|
self._next_id = cur + 1
|
||||||
|
|
||||||
return 1
|
return cur
|
||||||
|
|
||||||
|
|
||||||
class StreamIdGenerator(object):
|
class StreamIdGenerator(object):
|
||||||
|
|
Loading…
Reference in New Issue