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
Feature/log disconnected rebased #987
Merged
Merged
Conversation
This file contains 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
This commit adds logging the result of `riakc_pb_socket:is_connected/1` when Riak CS recieved {error, disconnected} from Riak. This forms a part of long campaign of connection problem between Riak and Riak CS. `riakc_pb_socket:is_connected/1` returns `{false, []}` mostly when TCP connection was closed by Riak - or by Operating System. Sometimes increasing `somaxconn` or `pb_backlog` helps. If the second element of the return value, the list of reasons when connecting to Riak (technically, return value of `gen_tcp:connect` might help diagnosing the root cause, which is usually outside Riak and Riak CS. Those logging lines are added to major places where disconneced error was observed. `riakc_pb_socket` could return disconneced at any call, potentially, but these logging lines will cover most of them.
By default the options is [{auto_reconnect, true}, {queue_if_disconnected}]. This commit makes them configurable by setting riakc_auto_reconnect and riakc_queue_if_disconnected into app.config (or advanced.config in future 2.0)
@@ -28,7 +28,8 @@ | |||
put/3, | |||
put_with_no_meta/2, | |||
put_with_no_meta/3, | |||
list_keys/2]). | |||
list_keys/2, | |||
check_connection_status/2]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One extra white space char.
Seems nice in general. Only a few tiny nitpicks. Great work 👑 |
Updated |
borshop
added a commit
that referenced
this pull request
Oct 9, 2014
Feature/log disconnected rebased Reviewed-by: shino
@borshop merge |
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.
rebased #980 . See that issue to learn the discussion.