Renewals return the start position instead of the current watermark
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/faucet
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
slavakurilyak/awesome-ai-agents#1026 ·
-
GetBatchResponseById panics for items without a body (204/302) and for unknown idsCó thể đã có người làm @0z5a đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
JuliusBrussee/caveman#1567 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug postgresql
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày