-
Notifications
You must be signed in to change notification settings - Fork 1
[Epic] Fix SSE re-emit race after async UPDATEs #654
Copy link
Copy link
Open
0 / 10 of 1 issue completedLabels
bugSomething isn't workingSomething isn't workingepicEpic-level tracking issueEpic-level tracking issuekind:epicParent epic issueParent epic issuelmlTouches library-metadata-lookupTouches library-metadata-lookuptubafrenzyTouches WXYC/tubafrenzy (webhook, legacy mirror, flowsheet ETL, reconcile)Touches WXYC/tubafrenzy (webhook, legacy mirror, flowsheet ETL, reconcile)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingepicEpic-level tracking issueEpic-level tracking issuekind:epicParent epic issueParent epic issuelmlTouches library-metadata-lookupTouches library-metadata-lookuptubafrenzyTouches WXYC/tubafrenzy (webhook, legacy mirror, flowsheet ETL, reconcile)Touches WXYC/tubafrenzy (webhook, legacy mirror, flowsheet ETL, reconcile)
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
Multiple async post-INSERT UPDATEs on
flowsheetrows fire after the synchronousliveFsSSE refetch event. Connected consumers fetch the row before the UPDATE lands, see NULL, and never see a second event. This affects iOS users (tubafrenzy mode, ~100% today) and dj-site once it migrates to SSE.The fix shape is shared across both children: a resolved-callback mechanism on the fire-and-forget helper that fires after the UPDATE commits with at least one user-visible field non-null, routed through a single in-process notify point that drives the playlist-proxy re-enrich and a richer
liveFsbroadcast (type='metadata-updated'/'linkage-updated', with the changed fields).Children
liveFsafter metadata enrichment UPDATE lands (fireAndForgetMetadataForRow). The load-bearing fix: introduces the resolved-callback mechanism and the playlist-proxy re-enrich notify point.fireAndForgetLinkage). Same race shape, different field set. Mirrors the mechanism Re-emit liveFs SSE event after metadata enrichment UPDATE lands #628 introduces; depends on Re-emit liveFs SSE event after metadata enrichment UPDATE lands #628 landing first.Both children share the same notify-point machinery; this parent serves as a single tracking entry for the work.
Adjacent
body.album_id !== undefinedbranch entirely (no LML lookup needed when the album row is in hand). Strictly complementary to Re-emit liveFs SSE event after metadata enrichment UPDATE lands #628 — it shrinks the surface that Re-emit liveFs SSE event after metadata enrichment UPDATE lands #628's callback has to cover.Acceptance
Out of scope
liveFssubscription (tracked at Subscribe to Backend-Service liveFs SSE for metadata updates (BS-mode) wxyc-ios-64#227, gated on BS-mode rollout).