You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/12/09 18:54:01 UTC

[GitHub] [kafka] bristy commented on a change in pull request #9621: KAFKA-9892: Producer state snapshot needs to be forced to disk

bristy commented on a change in pull request #9621:
URL: https://github.com/apache/kafka/pull/9621#discussion_r539562607



##########
File path: core/src/main/scala/kafka/log/ProducerStateManager.scala
##########
@@ -437,7 +437,7 @@ object ProducerStateManager {
 
     val fileChannel = FileChannel.open(file.toPath, StandardOpenOption.CREATE, StandardOpenOption.WRITE)
     try fileChannel.write(buffer)
-    finally fileChannel.close()
+    finally fileChannel.force(true)

Review comment:
       Raising fix.




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

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