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


##########
server/src/main/java/org/apache/kafka/server/share/dlq/ShareGroupDLQStateManager.java:
##########
@@ -214,6 +231,7 @@ class ProduceRequestHandler implements 
RequestCompletionHandler {
         private Node dlqPartitionLeaderNode;
         private int dlqDestinationPartition;
         private ShareGroupDLQMetadataCacheHelper.TopicPartitionData 
dlqTopicPartitionData;
+        private Map<Long, Record> originalRecordData;

Review Comment:
   Yes - we do have have the ability to resend the DLQ requests in case 
retryable error is received from PRODUCE RPC (upto 5 times based on exponential 
backoff).
   
   If we are retrying, there is no need to keep refetch the records associated 
with the call and hence keeping them cached would be more efficient. We fetch 
records only once when the DLQ PRODUCE RPC is sent for the first time.
   
   The `originalRecordData` map is a per handler (created as part of external 
DLQ request) member and will be short-lived (until the RPC fails 
catastrophically or succeeds)



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