Repository navigation
Does the offline client session DB fallback (PR #17490) also cover entries lost via ISPN000313 abrupt leavers? #54146
|
We're on Keycloak 19.0.3, which we know is unsupported. We're planning to upgrade and would like BackgroundWe're seeing The difference in our case is how the client session goes missing. We don't limit cache size (The same message was logged for
|
Replies: 1 comment 1 reply
|
I went through the code at 19.0.3, 21.1.0 and 26.8.1. Your case is covered from 21.1.0 on, and what you see on 19.0.3 matches the cause you describe.
What I can't rule out from the Keycloak side is a write that was in flight exactly when the two pods left.
If you want to check it before relying on it: create a bunch of offline sessions (1000 or so), On 19.0.3 I'd expect a full stop and start of all nodes to clear the stale entries, a rolling restart probably not since state transfer keeps them. I haven't tested this one, it's only from reading the code. |
I went through the code at 19.0.3, 21.1.0 and 26.8.1. Your case is covered from 21.1.0 on, and what you see on 19.0.3 matches the cause you describe.
Yes. In 21.1.0
getClientSessiondoesn't care why the entry is missing. If it's not inofflineClientSessionsand the session is offline, it goes topersister.loadClientSession(...)(L388-L406). The DB lookup is by user session id + client id + offline flag (JpaUserSessionPersisterProvider L386-L408), not by the cached UUID. That UUID is only a cache key,OFFLINE_CLIENT_SESSIONdoesn't store it, and after the reload the new one is written back into the user session (L1044-L1061). So lost by ISPN000313 or evicted by a limit is the same path.…