jsancio commented on a change in pull request #10097:
URL: https://github.com/apache/kafka/pull/10097#discussion_r574082327



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -126,9 +126,14 @@
  *    gracefully resign from the current epoch. This causes remaining voters 
to immediately
  *    begin a new election.
  *
- * 4) {@link FetchRequestData}: This is the same as the usual Fetch API in 
Kafka, but we piggyback
- *    some additional metadata on responses (i.e. current leader and epoch). 
Unlike partition replication,
- *    we also piggyback truncation detection on this API rather than through a 
separate truncation state.
+ * 4) {@link FetchRequestData}: This is the same as the usual Fetch API in 
Kafka, but we add snapshot
+ *    check before responding, and we also piggyback some additional metadata 
on responses (i.e. current
+ *    leader and epoch). Unlike partition replication, we also piggyback 
truncation detection on this API
+ *    rather than through a separate truncation state.
+ *
+ * 5) {@link FetchSnapshotRequestData}: Sent by the follower when 
FetchResponse include a snapshot id,
+ *    this is similar to the Fetch API since the snapshot is also stored as 
FileRecords, but we use
+ *    {@link UnalignedRecords} in FetchSnapshotResponse because the records is 
not necessarily offset-aligned.

Review comment:
       Thanks for doing this. I also noticed it was missing and fixed it in 
this PR: 
https://github.com/apache/kafka/pull/10085/files#diff-1da15c51e641ea46ea5c86201ab8f21cfee9e7c575102a39c7bae0d5ffd7de39R134-R137
   
   Maybe reconcile the two changes and we can merge this one.

##########
File path: raft/src/main/java/org/apache/kafka/raft/NetworkChannel.java
##########
@@ -30,10 +30,8 @@
     int newCorrelationId();
 
     /**
-     * Send an outbound message. This could be either an outbound request
+     * Send an outbound message. This could be an outbound request
      * (i.e. an instance of {@link org.apache.kafka.raft.RaftRequest.Outbound})
-     * or a response to a request that was received through {@link 
#receive(long)}

Review comment:
       How about just:
   
   ```java
   /**
    * Send an outbound request message.
    *
    * @param request outbound request to send
    */
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to