You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Sanjay Malakar (Jira)" <ji...@apache.org> on 2026/06/11 02:33:00 UTC
[jira] [Created] (ZOOKEEPER-5055) Ensure FileTxnLog.close() closes every stream
Sanjay Malakar created ZOOKEEPER-5055:
-----------------------------------------
Summary: Ensure FileTxnLog.close() closes every stream
Key: ZOOKEEPER-5055
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-5055
Project: ZooKeeper
Issue Type: Bug
Components: server
Reporter: Sanjay Malakar
{{org.apache.zookeeper.server.persistence.FileTxnLog.close()}} closes {{logStream}} and the {{streamsToFlush}} queue sequentially. If any {{java.io.FileOutputStream.close()}} call throws {{{}java.io.IOException{}}}, the method exits immediately and does not attempt to close the remaining file streams. This can leak file descriptors during transaction-log shutdown.
{{org.apache.zookeeper.server.persistence.FileTxnLog.close()}} should attempt every close operation, preserve the first {{{}java.io.IOException{}}}, attach later failures as suppressed exceptions, and throw only after all streams have been attempted.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)