Renewals return the start position instead of the current watermark

Abierto
#88 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go, postgresql, sql
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Go
Estrellas
1
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/faucet

Todos los issues de coder/faucet

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.