jsancio commented on code in PR #12833:
URL: https://github.com/apache/kafka/pull/12833#discussion_r1017191691


##########
core/src/main/scala/kafka/server/metadata/BrokerMetadataListener.scala:
##########
@@ -398,8 +398,11 @@ class BrokerMetadataListener(
         build()
       try {
         _image.write(writer, options)
-      } finally {
-        writer.close()
+        writer.close(true)

Review Comment:
   `MetadataImage::write` calls `ImageWriter::close(true)`. Can we remove that 
call? It if very difficult to read and understand code that closes 
`AutoCloseable` in different layers of the code.



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