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
Changes from 4 commits
8d853ec
d293e24
9bbb1f3
cfc7cbe
962418e
e709d60
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. One extra white space char. |
||
|
||
%% @doc Get an object from Riak | ||
-spec get_object(pid(), binary(), binary()) -> | ||
|
@@ -85,3 +86,18 @@ list_keys(PbcPid, BucketName) -> | |
{error, _}=Error -> | ||
Error | ||
end. | ||
|
||
-spec check_connection_status(pid(), term()) -> no_return(). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From http://www.erlang.org/doc/reference_manual/typespec.html,
This function return |
||
check_connection_status(Pbc, Where) -> | ||
try | ||
case riakc_pb_socket:is_connected(Pbc) of | ||
true -> ok; | ||
Other -> | ||
_ = lager:warning("Connection status of ~p at ~p: ~p", | ||
[Pbc, Where, Other]) | ||
end | ||
catch | ||
Type:Error -> | ||
_ = lager:warning("Connection status of ~p at ~p: ~p", | ||
[Pbc, Where, {Type, Error}]) | ||
end. |
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.
riak_cs_pbc:check_connection_status
logs of connection status, so this log seems unnecesarry.General
{error, Reason}
is logged ateligible_manifest_keys
's branch({{error, Reason}, EndTime}, _) ->
.