Skip to content
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 6 commits into from Oct 9, 2014

Conversation

kuenishi
Copy link
Contributor

@kuenishi kuenishi commented Oct 8, 2014

rebased #980 . See that issue to learn the discussion.

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]).
Copy link
Contributor

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.

@shino
Copy link
Contributor

shino commented Oct 9, 2014

Seems nice in general. Only a few tiny nitpicks. Great work 👑

@kuenishi
Copy link
Contributor Author

kuenishi commented Oct 9, 2014

Updated

borshop added a commit that referenced this pull request Oct 9, 2014
Feature/log disconnected rebased

Reviewed-by: shino
@kuenishi
Copy link
Contributor Author

kuenishi commented Oct 9, 2014

@borshop merge

@borshop borshop merged commit e709d60 into release/1.5 Oct 9, 2014
@kuenishi kuenishi deleted the feature/log-disconnected-rebased branch October 9, 2014 07:48
@shino shino modified the milestone: 1.5.2 Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants