lucasbru commented on code in PR #18963:
URL: https://github.com/apache/kafka/pull/18963#discussion_r1971542987


##########
tools/src/main/java/org/apache/kafka/tools/ShareConsumerPerformance.java:
##########
@@ -79,7 +79,8 @@ public static void main(String[] args) {
                 shareConsumers.forEach(shareConsumer -> 
shareConsumersMetrics.add(shareConsumer.metrics()));
             }
             shareConsumers.forEach(shareConsumer -> {
-                Map<TopicIdPartition, Optional<KafkaException>> val = 
shareConsumer.commitSync();
+                @SuppressWarnings("UnusedLocalVariable")
+                Map<TopicIdPartition, Optional<KafkaException>> ignored = 
shareConsumer.commitSync();

Review Comment:
   I think the local was introduced because of a false alarm in spotbugs. It 
claims `commitSync` is side effect free (which is not true). We need to either 
annotate `commitSync` with `@CanIgnoreReturnValue` or have this workaround. I'd 
prefer having this workaround, as this is just performance testing code and we 
don't want to annotate user-facing interfaces like the share consumer with 
spotbugs annotations.



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to