RATIS-1622. Fix high CPU load when some followers are down#680
RATIS-1622. Fix high CPU load when some followers are down#680szetszwo merged 7 commits intoapache:masterfrom
Conversation
ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java
Outdated
Show resolved
Hide resolved
szetszwo
left a comment
There was a problem hiding this comment.
+1 the change looks good.
codings-dan
left a comment
There was a problem hiding this comment.
@drriguz There are many failed ci tests, see https://github.com/apache/ratis/runs/7333835180?check_suite_focus=true#step:5:1030 Can you take a look, thank you!
Yeah, I'll try to figure it out! |
|
@szetszwo Hi, there's failed test: previously the failed test is: But I tried run tests locally several times and none of them failed, either the tests are not stable, or this commit somehow makes it unstable. Do you think it's related to this commit? |
Yes, then it must be related. I'll dig into it. |
…with -1 instead of 0, since 0s might be skipped as terminator
(cherry picked from commit e52710a)
What changes were proposed in this pull request?
Avoid using 0 delay for slow or dead followers when new entries comes.
What is the link to the Apache JIRA
RATIS-1622: High cpu usage of LogAppenderDaemon
Please replace this section with the link to the Apache JIRA)
How was this patch tested?
Tested manually by using the following steps:
The CPU load is significantly reduced from 90% to 10%(in Docker environment, and cpus is limited to 1 for each node).
However, some unit tests fails locally. I'll open this to see if any tests will fail in CI.