Raw event cursors still count every repository's raw events
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 40/100
Direção de pesquisa
Take #78's typed-event fix as the template — per-target counter, insert-lock trigger, per-target purge mark — because the raw path must mirror it. Read faucet/pgstore/queries/rawevents.sql:90 and :235 for the shared MAX(id) head, then the four call sites that surface it: faucet/rawpoll.go:190, faucet/rawsubscribe.go:167, faucet/rawdeliver.go:72 and :100. Reproduce the leak with a two-repository test before editing. Done when the four checks in the issue hold and an old r1. cursor restarts as truncated.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Raw event cursors still let a caller count other repositories' raw events and time their arrival. #78 fixed this for typed events only.
Raw events are off unless FAUCET_RAW_EVENTS is set, and production does not set it. docs/security.md already names this as a known gap. Fix it before anyone turns raw events on.
Where the shared number reaches a caller (main 157e81b)
All raw positions are faucet_raw_events.id, one sequence for every repository:
faucet/pgstore/queries/rawevents.sql:90and:235: the head isMAX(id)over the whole table.faucet/rawpoll.go:190: theevents/pollcursor for a raw name (r1.<n>plus the lease).faucet/rawsubscribe.go:167: the subscribe reply cursor.faucet/rawdeliver.go:72and:100: the push watermark and the raw gap cursor.
Suggested fix
Do what #78 did for typed events. Give each target its own count of raw events, assigned under the insert lock by a trigger so an old build keeps numbering during a rolling deploy. Give each target its own purge mark. Return only positions on the named target's count. Never translate an old r1. cursor: restart it as truncated.
Done when
The checks from #78 hold for raw names:
- A reader of a quiet repository gets the same values whether or not other repositories receive raw events or get purged.
- A
maxAgeMsand cursor sweep gives the same answers with or without other repositories' traffic. - A resumed read skips and repeats nothing.
- A hand-made cursor stays on the reader's own count.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Linguagem predominante
- Go
- Estrelas
- 1
- Forks
- 0
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de coder/faucet
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 28/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 30/100
Todas as issues de coder/faucet
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 62/100
slavakurilyak/awesome-ai-agents#1026 ·
-
GetBatchResponseById panics for items without a body (204/302) and for unknown idsTalvez já em andamento @0z5a assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
JuliusBrussee/caveman#1567 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
bug postgresql
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
Mantenedores costumam responder em até 1 dia