In the current implementation, MappedFileQueue#flush returns false when flushing is successful.
This is not intuitive and error prone.
For instance, in CommitLog#run line:915-918
I believe retries has to be done when flushing is not successful. But with the code above, it can try to flush only once on CommitLog termination and not continue retrying.
The same is for DefaultMessageStore#doFlush line:1551
Or is this not retry on failure, but the number of times flushing has to be done? Then, RETRY_TIMES_OVER should be renamed to something like FLUSH_NUM.