Details
Description
public long getWaitTimeMs() { if (haveTooManyPendingRequests()) { return getHeartbeatWaitTimeMs(); // Should wait for a short time } else if (shouldSendAppendEntries() && !isSlowFollower()) { // For normal nodes, new entries should be sent ASAP // however for slow followers (especially when the follower is down), // keep sending without any wait time only ends up in high CPU load return Math.max(getMinWaitTimeMs(), 0L); } return Math.min(getMinWaitTimeMs(), getHeartbeatWaitTimeMs()); }
GrpcLogAppender's main loop does not wait if there is nothing to be sent or follower is slow (last return in getWaitTimeMs):
(GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(10, 72) -> 10 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(0, 61) -> 0 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 61) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 61) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 61) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 61) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 61) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-1, 60) -> -1 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 60) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 60) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 60) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 60) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 60) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 60) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 60) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-2, 59) -> -2 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 59) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 59) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 59) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3 (GrpcLogAppender.java:getWaitTimeMs(187)) - s2@group-6BFAB8E011F7->s0-GrpcLogAppender: wait min(-3, 58) -> -3
Attachments
Issue Links
- Discovered while testing
-
HDDS-8382 Upgrade Ratis to 2.5.1
- Resolved
- is caused by
-
RATIS-1793 Enforce raft.server.log.appender.wait-time.min
- Resolved
- links to