-
Notifications
You must be signed in to change notification settings - Fork 96
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
handle timeout error on sum_bucket/2 #759
Conversation
causes dirty error message and no way to know which bucket was failed in usage calculation mapreduce. This commit adds two ways to know that: - outputs an error log that prints user key id and bucket name with error reason. - stores the result into moss.storage with reason like: { "bucket_name" : "{error,{timeout,[]}}" } The latter log proves and indicated there existed a bucket at that time even though its usage size was unknown. Better than ignored, which operator can't tell non-existent from calculation failure.
Code looks good.
|
I'm seeing the following dialyzer errors related to this change:
|
Hooray! It was totally a bug found by dialyzer. |
👍 |
handle timeout error on sum_bucket/2
{error, Error} -> | ||
{error, Error} | ||
end. | ||
|
||
%% @doc Output a log when calculating total usage of a bucket. | ||
%% This log is *very* important because unless this log |
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/unless/without
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.
Oh crap. Thank you for pointing it out.
addresses #743.
from commit message: