You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
currentRowCountTask is never cancelled on teardown and is overwritten without cancelling #2059
currentRowCountTask is the one long-lived task handle on MainContentCoordinator that nothing reliably cancels. Two distinct problems, both verified in the tree.
1. teardown() does not cancel it
MainContentCoordinator.teardown() cancels every other stored task:
Neither cancels what was already in the slot. Two loads in quick succession orphan the first task: it keeps running, and only the second one can clear the field.
The only place that does cancel it is PaginationCoordinator.cancelCurrentQuery (:133), which is Stop and refresh only.
Impact
Bounded. An exact row count is a single read, and the write-back is guarded by the content epoch introduced in #2055, so a late one cannot corrupt the grid. This is wasted server work and a task outliving its owner, not incorrect data.
Suggested fix
Cancel before assigning at both writers, and add the handle to teardown(). A tiny wrapper (setRowCountTask(_:) that cancels the previous) would make it impossible to get wrong at a third call site.
Activity