-
Notifications
You must be signed in to change notification settings - Fork 959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replayed activation commands may fail because of their execution sequence #1255
Comments
Thanks for the report. I'm currently puzzled how this is even possible as If you can reproduce the issue only locally, it would make sense the bit where the In general, reconnect performs a connection handshake including authentication ( |
I just rebooted the server where redis runs and I have got the same logs, including the pattern of successful-unsuccessful-successful reconnect followed by the SELECT warning. So the issue is probably reproducible I don't quite follow the logic in |
That could be a likely explanation. If you’re able to reproduce the issue, can you attach a debug log so we can see what’s happening on the transport? |
Unfortunately the bug is not reproducible in test environment where I can enable debug logging. It apparently depends on timing of communication between the app and redis server. |
In any case, it makes sense to not re-queue/replay activation commands. |
Commands issued during connection activation (re-authentication, database re-selection, re-subscribe) are no longer replayed if the connection gets disconnected while the commands didn't complete yet.
Commands issued during connection activation (re-authentication, database re-selection, re-subscribe) are no longer replayed if the connection gets disconnected while the commands didn't complete yet.
That's fixed now for 5.3.0 and 6.0. |
Bug Report
StatefulRedisPubSubConnectionImpl
logs a warning:SELECT failed: ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context
when repeatedly reconnecting in a short period of time (due to redis server restart). I assume this is a bug. Lettuce should be smart enough to not issue commands in the wrong order.Current Behavior
Most relevant logs
Full logs
Input Code
Input Code
Expected behavior/code
Instead of just silencing the warning (which I can do now), I would prefer to see a fix for whatever underlying bug is causing this.
Environment
The text was updated successfully, but these errors were encountered: