cecemei commented on code in PR #18234:
URL: https://github.com/apache/druid/pull/18234#discussion_r2223684412
##########
extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java:
##########
@@ -265,12 +266,18 @@ protected Map<KafkaTopicPartition, Long>
getPartitionRecordLag()
return null;
}
- if
(!latestSequenceFromStream.keySet().equals(highestCurrentOffsets.keySet())) {
- log.warn(
- "Kafka partitions[%s] do not match task partitions[%s]",
- latestSequenceFromStream.keySet(),
- highestCurrentOffsets.keySet()
+ Set<KafkaTopicPartition> kafkaPartitions =
latestSequenceFromStream.keySet();
+ Set<KafkaTopicPartition> taskPartitions = highestCurrentOffsets.keySet();
+ if (!kafkaPartitions.equals(taskPartitions)) {
+ List<KafkaTopicPartition> missingTaskPartitions = new ArrayList<>(
+ Sets.difference(kafkaPartitions, taskPartitions)
);
+ List<KafkaTopicPartition> missingKafkaPartitions = new ArrayList<>(
+ Sets.difference(taskPartitions, kafkaPartitions)
+ );
+
+ log.warn("Mismatched kafka and task partitions: Missing Task Partitions
%s, Missing Kafka Partitions %s",
Review Comment:
ah my bad, i forgot it needs to be handled. anyway, `DruidException` seems
fine, or maybe even `RuntimeException` is sufficient too. also, i think it
should be `serialize`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]