smjn commented on code in PR #22257:
URL: https://github.com/apache/kafka/pull/22257#discussion_r3242145157
##########
share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorShard.java:
##########
@@ -777,7 +777,8 @@ private
Optional<CoordinatorResult<WriteShareGroupStateResponseData, Coordinator
Optional<CoordinatorMetadataImage.TopicMetadata> topicMetadataOp =
metadataImage.topicMetadata(topicId);
if (topicMetadataOp.isEmpty() ||
topicMetadataOp.get().partitionCount() <= partitionId) {
- log.error("Topic/TopicPartition not found in metadata image.");
+ log.error("Topic or partition not found in metadata image when
writing: {}:{}-{}.", topicId,
+
topicMetadataOp.map(CoordinatorMetadataImage.TopicMetadata::name).orElse("null"),
partitionId);
Review Comment:
lets encapsulate this in a private method for readability
--
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]