You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "apoorvmittal10 (via GitHub)" <gi...@apache.org> on 2026/06/04 10:50:00 UTC
Re: [PR] KAFKA-20612: Stitch DLQ metrics with ShareGroupDLQStateManager. [kafka]
apoorvmittal10 commented on code in PR #22412:
URL: https://github.com/apache/kafka/pull/22412#discussion_r3355401528
##########
server/src/main/java/org/apache/kafka/server/share/dlq/ShareGroupDLQStateManager.java:
##########
@@ -154,6 +172,16 @@ CompletableFuture<Void> dlq(ShareGroupDLQRecordParameter param, long requestBack
return future;
}
+ // Visibility for tests
+ void setGenerateCallback(Runnable generateCallback) {
+ this.generateCallback = generateCallback;
+ }
Review Comment:
Is it really required to have this callback and can't we spy on the method calls?
##########
server/src/main/java/org/apache/kafka/server/share/dlq/ShareGroupDLQStateManager.java:
##########
@@ -154,6 +172,16 @@ CompletableFuture<Void> dlq(ShareGroupDLQRecordParameter param, long requestBack
return future;
}
+ // Visibility for tests
+ void setGenerateCallback(Runnable generateCallback) {
+ this.generateCallback = generateCallback;
+ }
+
+ // Visibility for tests
+ Map<Node, List<ShareGroupDLQStateManager.ProduceRequestHandler>> nodeRPCMap() {
+ return nodeRPCMap;
Review Comment:
Return an immuatbele copy of map so it can never be modified outside of this class.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org