@Override
                public Void call() throws IOException {
                    log.flush();
                    offsetIndex().flush();
                    timeIndex().flush();
                    txnIndex.flush();
                    return null;
                }
Flush this log segment to disk.

This method is thread-safe.
storage/src/main/java/org/apache/kafka/storage/internals/log/LogSegment.java