[
https://issues.apache.org/jira/browse/KAFKA-7345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthias J. Sax resolved KAFKA-7345.
------------------------------------
Resolution: Abandoned
This ticket does not apply any longer. The whole mechanism was changed via
KAFKA-12288. Closing.
> 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}
> locks.remove(taskId);
> 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.
> Edit (with discussion on PR #5574):
> The removal of taskId from locks should be done after all work has been done
> in releasing the lock.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)