fix(relay): stop panicking the ingest worker on reactions to project events - #5294
fix(relay): stop panicking the ingest worker on reactions to project events#5294Chessing234 wants to merge 1 commit into
Conversation
6dc523d to
7432464
Compare
|
🤖 Tested locally end-to-end — LGTM. ✅ Reproduced the panic on Before (buggy Postgres confirmed the exact failure mode described in the PR: the reaction row was persisted before the panic, so the client's retry hit the After (this branch): same steps —
The three-way |
…events
A NIP-25 reaction whose target is a project root or project comment (kind
1621 issue, 1618 PR, or a kind-1 comment on one) carries no h tag, so
channel_id is None on the reaction write path. The conformance-trace
emission asserted a channel was always present:
channel: channel_label(channel_id.expect("reaction path has channel")),
so the worker panicked at ingest.rs:2824. The row was inserted before the
panic, so the client saw a failed request for a persisted event and retried,
and the duplicate branch carried the same expect, head-of-line blocking a
durable publish queue forever.
Mirror the message write's three-way split at the same seam:
(Some, true) -> WriteInsert, (Some, false) -> WriteDuplicate, (None, _)
-> WriteInsertGlobal. The conformance vocabulary already models channel-less
writes; only the reaction path was missing it.
Closes block#4936
Signed-off-by: Taksh <takshkothari09@gmail.com>
Signed-off-by: Ravneet Arora <rarora@squareup.com>
7432464 to
1edf6c2
Compare
A NIP-25 reaction whose target is a project root or project comment (kind
1621 issue, 1618 PR, or a kind-1 comment on one) carries no h tag, so
channel_id is None on the reaction write path. The conformance-trace
emission asserted a channel was always present:
so the worker panicked at ingest.rs:2824. The row was inserted before the
panic, so the client saw a failed request for a persisted event and retried,
and the duplicate branch carried the same expect, head-of-line blocking a
durable publish queue forever.
Mirror the message write's three-way split at the same seam:
(Some, true) -> WriteInsert, (Some, false) -> WriteDuplicate, (None, _)
-> WriteInsertGlobal. The conformance vocabulary already models channel-less
writes; only the reaction path was missing it.
Closes #4936