fix too many ERR_BUSY logs problem when write throttling enabled #243
Conversation
"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", |
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.
是不是改成_counter_recent_write_throtting_count更合适
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.
throttling分为delay和reject,只有reject返回ERR_BUSY,并将该counter加1
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.
那是不是改成_counter_recent_write_reject_count更合适?总觉得busy有些笼统
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.
ERR_BUSY未必只有在throttling reject的时候才会返回。
这样看来,我还是加上counter_recent_read_busy_count吧。
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.
嗯,我刚刚看了下代码,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", |
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.
现在对read应该没有限流吧,暂时可以不加这个counter吧
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.
fixed
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.
ERR_BUSY未必只有在throttling reject的时候才会返回,所以还是加上counter_recent_read_busy_count。
apache/incubator-pegasus#319