Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fix too many ERR_BUSY logs problem when write throttling enabled #243

Merged
merged 4 commits into from Apr 16, 2019

Conversation

qinzuoyan
Copy link
Member

@qinzuoyan qinzuoyan added the type/bug-fix This PR fixes a bug. label Apr 16, 2019
@qinzuoyan qinzuoyan self-assigned this Apr 16, 2019
"recent.read.busy.count",
COUNTER_TYPE_VOLATILE_NUMBER,
"read busy count in the recent period");
_counter_recent_write_busy_count.init_app_counter("eon.replica_stub",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是改成_counter_recent_write_throtting_count更合适

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throttling分为delay和reject,只有reject返回ERR_BUSY,并将该counter加1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那是不是改成_counter_recent_write_reject_count更合适?总觉得busy有些笼统

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERR_BUSY未必只有在throttling reject的时候才会返回。
这样看来,我还是加上counter_recent_read_busy_count吧。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,我刚刚看了下代码,rpc busy的时候会返回ERR_BUSY,那还是加上吧

@@ -276,6 +276,14 @@ void replica_stub::install_perf_counters()
"recent.write.fail.count",
COUNTER_TYPE_VOLATILE_NUMBER,
"write fail count in the recent period");
_counter_recent_read_busy_count.init_app_counter("eon.replica_stub",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在对read应该没有限流吧,暂时可以不加这个counter吧

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERR_BUSY未必只有在throttling reject的时候才会返回,所以还是加上counter_recent_read_busy_count。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.11.4 type/bug-fix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants