[ https://issues.apache.org/jira/browse/KAFKA-7345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16592942#comment-16592942 ]
ASF GitHub Bot commented on KAFKA-7345: --------------------------------------- asutosh936 opened a new pull request #5574: KAFKA-7345 Added Finally block to execute Closing FileChannel URL: https://github.com/apache/kafka/pull/5574 *More detailed description of your change, if necessary. The PR title and PR message become the squashed commit message, so use a separate comment to ping reviewers.* *Summary of testing strategy (including rationale) for the feature or bug fix. Unit and/or integration tests are expected for any behaviour change and system tests should be considered for larger changes.* ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Potentially unclosed FileChannel in StateDirectory#unlock > --------------------------------------------------------- > > Key: KAFKA-7345 > URL: https://issues.apache.org/jira/browse/KAFKA-7345 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: Ted Yu > Priority: Minor > Attachments: KAFKA_7345.patch > > > {code} > lockAndOwner.lock.release(); > log.debug("{} Released state dir lock for task {}", logPrefix(), > taskId); > final FileChannel fileChannel = channels.remove(taskId); > if (fileChannel != null) { > fileChannel.close(); > {code} > If {{lockAndOwner.lock.release()}} throws IOE, the closing of the FileChannel > would be skipped. -- This message was sent by Atlassian JIRA (v7.6.3#76005)