SincereXIA opened a new pull request #616: URL: https://github.com/apache/ratis/pull/616
## What changes were proposed in this pull request? We previously tried to reduce disk IO by introducing a minimum interval between flushes, the relevant pr is here: https://github.com/apache/ratis/pull/611 However, after subsequent tests, we found that the raft performance has degraded, because `flushIfNecessary()` function does more operations than just flushing the stream. Since we enforced the minimum time for each flush, the raft log to can't be committed in flush intervals, which reduces the performance of raft. So we want to separate `out.flush()` from `flushIfNecessary()` and execute it asynchronously, so that the process of writing to disk will not block the operation of other threads ## What is the link to the Apache JIRA https://issues.apache.org/jira/projects/RATIS/issues/RATIS-1545 ## How was this patch tested? We use the ozone freon ockg tool to detect the effect of the changes. test command: ``` bin/ozone freon ockg --volume=volume --bucket=defaultbucket --thread=10 --number-of-tests=300 --size=`expr 32 \* 1048576` --prefix=stream ``` We tested the speed of writing 32MB and 128MB objects after enabe async flush:  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
