Renewals return the start position instead of the current watermark

Offen
#88 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
68/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
go, postgresql, sql
Bereich
backend

Rechercherichtung

Start in faucet/subscribe.go at the renewal branch (L276-280) that answers with the stored position, then read the renewal upsert in pgstore/queries/events.sql (L282-288) to see why the column never moves. Compare against the watermark that deliveries compute in pgstore/queries/deliveries.sql (L71-89) and decide whether to select it or advance the stored value. Done means a renewal response carries the same safe-to-persist cursor as a delivery; run the pgstore tests after changing the query.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

A renewal answers with the subscription's stored position (faucet/subscribe.go). The upsert keeps that value unchanged on a renewal of the same target (pgstore/queries/events.sql), and no other query moves it. It is where delivery started, not where it is now.

The spec describes the refresh cursor as a "safe-to-persist watermark; advances the client's cursor even if no events arrive before the next refresh" (events.mdx L439, see also L447).

Effect

A client that persists the cursor from each refresh, as the spec suggests, moves its cursor back to the start on every renewal. After a lapse it resubscribes from there and gets every event since the start again. I read this from the code and did not run it.

Proposal

Return the same watermark that deliveries carry (pgstore/queries/deliveries.sql) in the renewal response.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Vorherrschende Sprache
Go
Sterne
1
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus coder/faucet

Alle Issues in coder/faucet

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.