kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [kafka] hachikuji commented on a change in pull request #9352: KAFKA-10533; KafkaRaftClient should flush log after appends
Date Mon, 12 Oct 2020 23:17:43 GMT

hachikuji commented on a change in pull request #9352:
URL: https://github.com/apache/kafka/pull/9352#discussion_r503578710



##########
File path: raft/src/main/java/org/apache/kafka/raft/ReplicatedLog.java
##########
@@ -103,6 +103,16 @@
      */
     void updateHighWatermark(LogOffsetMetadata offsetMetadata);
 
+    /**
+     * Flush the current log to disk.
+     */
+    void flush();
+
+    /**
+     * Get the last offset which has been flushed to disk.
+     */
+    long lastFlushedOffset();

Review comment:
       I think we will need it to implement the leader deferred fsync or any other optimization
which allows the followers to read unflushed data from the leader. I decided to add it to
the interface since we have a trivial implementation for it in `KafkaMetadataLog` already.
We can save it for later if you prefer.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message