-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add latency stats for riak pb client operations [JIRA: RCS-243] #1189
Conversation
2i for listing MP uploads should use equal query but the function riakc_pb_socket:get_range/5 was used which is for range query. But, so luckily, this bug did not manifests for user facing response. The reason was two-fold, 1. only 2i key is important and value is always <<"1">> for MP 2i, and 2. Timeout value 60000 (integer) is larger than <<"1">> after converted to binary. So this commit fixes a bug that has not became reality ever.
{ok, _} = Success -> | ||
ProceedFun(Success); | ||
|
||
{error, Why} when Why == disconnected; | ||
Why == timeout -> | ||
_ = lager:debug("get_block_local/5 failed: {error, ~p}", [Why]), | ||
_ = lager:debug("get_block_local() failed: {error, ~p}", [Why]), |
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.
Why is this changed to ()
? Just /6
looks nice.
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.
The arity does not have information. I like log to be minimal but sufficient.
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.
To be honest, I want to use standard or de-fact notation to refer a function that does not specify (or emphasize) its arity. Sometimes, function_name/*
is used in Erlang, but it seems like a group of functions with the name (right?).
Any recommendation is appreciated 😅
Parenthesis with empty args may be not familiar.. Hmm... I saw the notation in exometer_core README.
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.
I won't make change about this.
What is |
@@ -113,6 +114,36 @@ pbc_pool_name(undefined) -> | |||
pbc_pool_name(BagId) when is_binary(BagId) -> | |||
list_to_atom(lists:flatten(io_lib:format("pbc_pool_~s", [BagId]))). | |||
|
|||
%% @doc Make a thunk that looks up samples for a given bucket+prefix. |
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.
s/prefix/postfix/ or s/prefix/suffix/ ?
Code looks nice, a lot simpler than I thought. Are you gonna update this branch? Or I'll just +1 now and go to next round. |
riak_test and manual tests have passed. |
Won't need fix for this right now, but Lifecycle mock fails like this:
|
Addressed your comments and pushed. Thanks for review, it helps much 😄 |
Ah, I don't look at location endpoint error. Will you file it as a new issue? |
Could not reproduce 403 for lifecycle endpoint in straightforward manner. My s3curl (I guess everyone owns his/her own s3curl, right?) does not understand h/t to @ksauzz for pointing out subresource mismatch for 403 error |
My laptop eunit failed:
|
Add latency stats for riak pb client operations Reviewed-by: kuenishi
@borshop merge |
This is a part of RCS-11 work; release notes will be written there. _[posted via JIRA by Kota Uenishi]_ |
Part 3 of stats improvement which addresses #961 (RCS-37) (RCS-217) (RCS-217) (RCS-37) (RCS-37) (RCS-217) partially.
This PR adds latency/counter stats for (almost) every riak pb client operations.
Excluded operations and reasons are as follows:
Also this PR fixes a bug that timeout is not properly set from
application environment for multipart upload listing call. Please
refer the commit message of dc637e1
for details.