Delivery runs: many logins can still delay others' webhooks, and gaps can count 2 for one subscription

Offen
#72 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@ThomasK33 arbeitet bereits daran.

Seit 19.11.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

Two notes from the verifiers of #67 and #71 are still open. Neither is new: both were already there before #67.

Many logins can still delay other logins' webhooks

A /cron/deliver run has 25 s, but it starts reads only while 20 s are left, so all reads share about 5 s. Each login gets 1 s of that (scanTimeout), and ScanTargets serves the subscriptions furthest behind first. Five or more logins that each add one subscription per run with cursor: "v1.0" (a replay of the whole history) take the whole 5 s. Other logins' subscriptions then wait. The verifier of #67 saw a healthy login go unserved in 8 of 8 runs with five such logins; base behaves the same. Four logins delayed it by one run in 2 of 5 tries.

Possible fixes: order ScanTargets round-robin by principal instead of by scanned_through alone, or cap how many replay subscriptions a login may open per run.

gaps can count 2 for one subscription in one run

If a purge raises the purge mark above a subscription's read position after that read crossed the old mark, the same run can raise a second gap for it. DeliverResult.Gaps (the gaps field of /cron/deliver) then counts 2 for one subscription. Only one gap envelope is sent. Found by reading enqueueWindow in faucet/deliver.go, not tested live.


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.