fix(sync): place a start=now cursor a minute behind the present

updatedAt is stamped when a write is built, not when it commits, so a
transaction in flight when the cursor was handed out could commit a row
stamped before it, and a watermark at serverNow skipped that row for
good. The watermarks now sit one minute back; client upserts are
idempotent, so the overlap is harmless. The token's issue time stays
serverNow.
This commit is contained in:
Marc-André Bombeck committed 2026-11-07 01:33:19 +01:00
1 parent 126bab8c00
commit 01884e91fa
8 files changed
+79 -26

No files matched your search

+12 -8
View File
@@ -4515,16 +4515,20 @@ paths:
- in: query
name: start
schema:
description: "`now` answers an empty page (every domain empty, `hasMore: false`) whose `cursor` sits at `serverNow` in
every domain, in the same opaque format as any other page. Paging forward from it yields only what changes
from then on, including `measurementMirror`, without walking the history first. Mutually exclusive with
`cursor` (422). A server without it ignores the parameter and starts from the oldest row."
description: "`now` answers an empty page (every domain empty, `hasMore: false`) whose `cursor` sits one minute before
`serverNow` in every domain, in the same opaque format as any other page. Paging forward from it yields
what changes from then on, plus anything written in that last minute (a write stamped before `serverNow`
can commit after it, and is not skipped; upserts are idempotent, so a row seen twice is harmless),
including `measurementMirror`, without walking the history first. Mutually exclusive with `cursor` (422).
A server without it ignores the parameter and starts from the oldest row."
type: string
const: now
description: "`now` answers an empty page (every domain empty, `hasMore: false`) whose `cursor` sits at `serverNow` in
every domain, in the same opaque format as any other page. Paging forward from it yields only what changes
from then on, including `measurementMirror`, without walking the history first. Mutually exclusive with
`cursor` (422). A server without it ignores the parameter and starts from the oldest row."
description: "`now` answers an empty page (every domain empty, `hasMore: false`) whose `cursor` sits one minute before
`serverNow` in every domain, in the same opaque format as any other page. Paging forward from it yields what
changes from then on, plus anything written in that last minute (a write stamped before `serverNow` can
commit after it, and is not skipped; upserts are idempotent, so a row seen twice is harmless), including
`measurementMirror`, without walking the history first. Mutually exclusive with `cursor` (422). A server
without it ignores the parameter and starts from the oldest row."
- in: query
name: limit
schema: