mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 08:12:52 +00:00
fix(sync): hold a drained cursor a minute back so late commits arrive
A page's watermark is its last row's stamp, and a long import stamps its rows before it commits them: a quick write committing in between carried the watermark past them, and the keyset never returned them. A caught-up page now hands out watermarks at most a minute before serverNow in every row domain, as start=now does, so the next pull reads that minute again. The mirror domain keeps its watermark.
This commit is contained in:
1 parent
928ade5109
commit
6fb0d184f1
7 files changed
+97
-7
No files matched your search
@@ -285,7 +285,9 @@ export const syncChangesResponse = z
|
||||
.describe("Opaque cursor to echo into the next request."),
|
||||
hasMore: z
|
||||
.boolean()
|
||||
.describe("False once the client is caught up as of `serverNow`."),
|
||||
.describe(
|
||||
"False once the client is caught up as of `serverNow`. The cursor of such a page sits at most a minute before `serverNow` in each row domain, so the next pull reads rows changed in that last minute again (a write still in flight may commit a row stamped there); upserts are idempotent.",
|
||||
),
|
||||
cursorExpired: z
|
||||
.boolean()
|
||||
.describe(
|
||||
|
||||
Reference in new issue
Block a user