Fix duplicate client_eof caused by connection timeout#88
Merged
wooparadog merged 1 commit intoeleme:masterfrom Aug 29, 2016
Merged
Fix duplicate client_eof caused by connection timeout#88wooparadog merged 1 commit intoeleme:masterfrom
wooparadog merged 1 commit intoeleme:masterfrom
Conversation
Contributor
|
LGTM |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have found the following logs in one of our running corvus:
The
client eofmessages are all followed by twoevent_deregisterin the log.How does it happen?
It's caused by duplicate call of
client_eofissued by connection timeout check.When a client connection is holding some unfinished cmds and encounters a client_eof (caused by receiving an illegal redis packet for example), the client connection is turned into an intermediate state. It set all its cmds to
staleand wait for all its cmds to be closed and then finally close itself. However before its cmds are closed, the timeout check may find this client connection and call client_eof again. This will result in negativeconnected_clients(#85) and the error log above.