SincereXIA commented on pull request #616: URL: https://github.com/apache/ratis/pull/616#issuecomment-1060288959
> @SincereXIA , we need to make sure that the flushIndex is updated only after flush has completed. Here is the idea https://issues.apache.org/jira/secure/attachment/13040750/616_FlushWorker.patch . Please see if you agree with the approach. Thanks. Hi @szetszwo, Thank you. We tested this patch, but we found that calling `updateFlushedIndexIncreasingly()` after the flush cause ratis performance is almost the same as synchronous flush. The RaftLog can't be committed until we call `updateFlushedIndexIncreasingly()` . So, may work will still be blocked by the out.flush() call.  Committing the raft log before the flush is fully completed may indeed be a security issue. But I I want to know if we can add a switch to allow users to choose whether they can accept sacrificing a certain amount of security in exchange for higher performance. Thanks. -- 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]
