villebro commented on PR #43696:
URL: https://github.com/apache/superset/pull/43696#issuecomment-5472578104
Pushed `840d764` addressing the remaining Medium + the doc nit.
**Coalesced the WS-mode catch-up.** A dashboard registering many async
charts no longer fires one `/task/status_changes` per chart. Since
`waitersByTaskId` is global, a single catch-up reconciles every pending waiter,
so triggers are coalesced via a tiny `scheduleCatchUp()` state machine (exactly
as recommended):
- same-tick registrations collapse into one request via a microtask
(`catchUpScheduled`);
- a trigger that arrives while a fetch is in flight (`catchUpInFlight`)
schedules exactly one follow-up (`catchUpQueued`);
- so a burst of N chart registrations → ~1 request, not N. Still one-shot —
no timer, no backoff loop.
Added a test (`WS mode: coalesces many same-tick registrations into one
catch-up`) asserting three same-tick registrations produce a single
`status_changes` call.
**Doc nit:** `submit_chart_data_query_tasks`'s docstring now describes the
websocket-vs-poll transport and the `tab_id` echoed in the 202 (instead of "the
client polls" / `{task_ids, cursor}`).
Thanks for the thorough passes — this and the prior rounds' fixes are all
in. Frontend suites (realtime/asyncEvent/hooks) green including the new
coalescing test; lint/format clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]