hubcio commented on issue #3650: URL: https://github.com/apache/iggy/issues/3650#issuecomment-4955107147
fyi some groundwork notes from reviewing #3652, since the reconnect/auto-login logic here will be the first real consumer of the new `sessionState`: - once auto-login reads `sessionState` to decide whether to re-login after reconnect, the concurrent-login race flagged on #3652 becomes observable (client can end up `Authenticated` + `Disconnected` after two racing logins on a dead conn). whatever shape the auto-login takes, login state transitions need to be atomic across the whole attempt - either no intermediate state at all, or a real in-progress guard, not a compare-and-restore. - `CheckAndRedirectToLeader` swallows non-context errors from the metadata fetch (logs + returns `"", nil`), so `LoginUser` can return success while the connection is already invalidated. auto-reconnect will paper over this, but the reconnect logic should not trust "login returned nil error" as "connection alive". - `shutdown()` early-returns on `conn.Close()` error before flipping state - a reconnect loop should treat `TransportStateShutdown` as the only terminal state and must not race with it. none of this blocks #3652 beyond what is already commented there; just things the reconnect design should account for. -- 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]
