Skip to content
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

RATIS-2176. Update doc for raft.server.log.appender.wait-time.min. #1181

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jojochuang
Copy link
Contributor

What changes were proposed in this pull request?

RATIS-1886 updated the default value of raft.server.log.appender.wait-time.min but didn't update the doc.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/RATIS-2176

How was this patch tested?

User doc change. No production code change.

@jojochuang
Copy link
Contributor Author

jojochuang commented Nov 23, 2024

The failed test is unrelated.
It was reported and supposedly fixed by https://issues.apache.org/jira/browse/RATIS-2098

| **Default** | 10ms |
| **Property** | `raft.server.log.appender.wait-time.min` |
|:----------------|:---------------------------------------------------------------------------|
| **Description** | wait time between two subsequent AppendEntries. Must be a positive number. |
Copy link
Contributor

Choose a reason for hiding this comment

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

@jojochuang , thanks a lot for working on this!

This conf has two purposes:

  1. wait time between two subsequent AppendEntries, and
  2. set to waitForReady in GrpcLogAppender (for the sleep waiting a gRPC stream to ready).

For (1), zero is allowed. For (2), zero becomes 1ms.

Do you think that the usage in (2) is problematic? If yes, we may use a different conf.

@jojochuang
Copy link
Contributor Author

Actually, just updating the doc is not sufficient.

GrpcLogAppender.StreamObservers.onNext() calls sleep for waitForReady, but internally it uses Thread.sleep() so it is never going to be less than one millisecond.

I'm looking at an Ozone cluster where follower DataNode completes the append follower_append_entry_latency just 0.66ms, but the leader's log_appender_latency is 1.36ms. Clearly, the one millisecond sleep granulaity is the problem for the append latency.

@jojochuang jojochuang marked this pull request as draft December 3, 2024 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants