smjn commented on code in PR #20815:
URL: https://github.com/apache/kafka/pull/20815#discussion_r2486426567


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -138,6 +139,16 @@ enum SharePartitionState {
         FENCED
     }
 
+    /**
+     * To provide static mapping between acknowledgement type bytes to 
RecordState.
+     */
+    private static final Map<Byte, RecordState> ACK_TYPE_TO_RECORD_STATE = 
Map.of(
+        (byte) 0, RecordState.ARCHIVED,                             // 
Represents gap
+        AcknowledgeType.ACCEPT.id, RecordState.ACKNOWLEDGED,
+        AcknowledgeType.RELEASE.id, RecordState.AVAILABLE,
+        AcknowledgeType.REJECT.id, RecordState.ARCHIVED

Review Comment:
   Though it is correct, we currently have no use for the the `recordState` 
value corresponding to to RENEW ack type. So it felt a bit more clean to leave 
it out.



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

Reply via email to