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
When a user switches shoot namespaces while a socket event synchronization is in-flight, the stale response from the old namespace can be applied to the current state.shoots, causing shoots from the previous namespace to appear in the new namespace view.
Root Cause
The socket event handler (useSocketEventHandler) calls socketStore.synchronize(pluralName, uids) which is an async operation with up to 60s timeout. During this await, the user can switch namespaces (triggering shootStore.subscribe() with new context). When the old synchronize resolves, it patches the store without verifying the subscription context still matches.
Description
When a user switches shoot namespaces while a socket event synchronization is in-flight, the stale response from the old namespace can be applied to the current
state.shoots, causing shoots from the previous namespace to appear in the new namespace view.Root Cause
The socket event handler (
useSocketEventHandler) callssocketStore.synchronize(pluralName, uids)which is an async operation with up to 60s timeout. During this await, the user can switch namespaces (triggeringshootStore.subscribe()with new context). When the old synchronize resolves, it patches the store without verifying the subscription context still matches.Key factors:
isInitial, so the generic initialization guard from fix(socket): guard against missing operator during store patch #2962 does not protect itsynchronizeLockonly prevents concurrent sync for the same subscription options, not cross-namespace stalenesssubscribe/unsubscribeflow has a gap where queued events from the old namespace can still be processedImpact
Possible Approaches
Related