villebro commented on code in PR #43701:
URL: https://github.com/apache/superset/pull/43701#discussion_r3891668628


##########
superset-frontend/src/views/CRUD/hooks.ts:
##########
@@ -339,10 +339,14 @@ export function useListViewResource<D extends object = 
any>(
       },
     );
 
-    // Nudges are lossy and not replayed, so on a socket (re)connect refetch 
the
-    // currently-displayed rows once to reconcile anything missed while the 
socket
-    // was down. In-place merge, no full-list redraw.
-    const unsubscribeOpen = subscribeRealtimeOpen(() => {
+    // Nudges are lossy and not replayed, so after recovering from a dropped
+    // socket refetch the currently-displayed rows once to reconcile anything
+    // missed while disconnected. Only on a real `reconnect` — not the initial
+    // connect (rows were just fetched) or a seamless `keepalive` token 
refresh —
+    // so a healthy socket doesn't trigger a full re-fetch every keepalive 
cycle.
+    // In-place merge, no full-list redraw.
+    const unsubscribeOpen = subscribeRealtimeOpen(reason => {
+      if (reason !== 'reconnect') return;
       patchRows(collectionRef.current.map(rowId));

Review Comment:
   Fixed in 799934d: `patchRows` now snapshots `latestRequestIdRef.current` 
before its fetch and discards the merge if a newer full fetch 
(page/filter/refresh) landed meanwhile, so a delayed reconcile can't overwrite 
fresher rows.



##########
superset/tasks/decorators.py:
##########
@@ -513,6 +513,10 @@ def _execute_inline(
             with use_context(ctx):
                 self.func(*args, **kwargs)
 
+            # The work finished; stop the abort listener from flipping this to
+            # ABORTED if a cancel signal lands now (mirrors the async 
executor).
+            ctx.mark_execution_completed()

Review Comment:
   Fixed in 799934d: the timeout callback now elects under `_abort_lock` and 
skips when `_execution_completed` is set (mirroring `_on_abort_detected`), so a 
timeout firing after the body completes can't flip a finished task to TIMED_OUT.



-- 
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]

Reply via email to