-
Notifications
You must be signed in to change notification settings - Fork 996
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
CommandHandler.exceptionCaught does incorrect behavior when occuring exception in addToStack() #788
Comments
Good catch. Do you have an example of an exception that may happen in the code path before the command is added to the protocol stack? |
If my application doesn't have enough memory, JRE throw OutOfMemory while processing stack.add(commandToUse); Thank you. |
Lettuce can't account for VM errors. If an |
However, I think lettuce should handle it when all kinds of exceptions are occured. Or you can disconnect channel and rebuild it. |
To quote a recommendation:
However, let's see whether we can do anything here at all. |
I hope my application receive an error or exception at all rather than an wrong response value. have a nice day. |
i agree. Incorrect data is very dangerous to business programs. |
I strongly agree with @hyunwookwi and @734839030 . @mp911de In the case of OOME due to heap exhaustion, it can be avoided by specifying Of course, it is difficult for a library to do the right thing for OOME, but can we stop returning wrong responses? |
The exception handling and connection handling have been revised quite a few times since the original report. Do you have stack traces handy? |
Sorry, unfortunately I do not have the stack traces at hand. Maybe it is the same as this one. For example, I think both heap and direct buffer could be OOME during encode. |
Hmmm. But maybe it's different because when it's OOME, it doesn't go into this block. |
lettuce version: 4.4.2.Final
when exception occured before
stack.add(commandToUse)
inaddToStack()
, Netty callCommandHandler.exceptionCaught()
.CommandHandler.exceptioCaught()
processstack.poll()
;I think this behavior seems to be wrong. because The command that failed due to an exception is not yet on the stack.
Please check your code.
Currently, I am using lettuce to get/set cache data with redis.
My application send set command using lettuce, and I expected "OK" response.
But sometimes, my app received response of previously get command.
And previously sent get command occur TimeoutException.
The text was updated successfully, but these errors were encountered: