kunwp1 commented on code in PR #5565:
URL: https://github.com/apache/texera/pull/5565#discussion_r3379338386
##########
frontend/src/app/common/service/computing-unit/computing-unit-status/computing-unit-status.service.ts:
##########
@@ -161,6 +165,8 @@ export class ComputingUnitStatusService implements
OnDestroy {
if (this.workflowWebsocketService.isConnected) {
this.workflowWebsocketService.closeWebsocket();
this.workflowStatusService.clearStatus();
+ // switching units: signal consumers to clear their stale state
+ this.connectionResetSubject.next();
}
Review Comment:
Done. The teardown is now gated on whether a previous connection existed
(`currentConnectedWid`/`currentConnectedCuid` defined) rather than on
`isConnected`. So switching units after the socket has already dropped (e.g.
the prior unit was terminated) still calls `clearStatus()` and emits the
connection-reset signal, while the first-ever connection still emits nothing.
Added a test for the disconnected-switch case.
--
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]