You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "iamsanjaymalakar (via GitHub)" <gi...@apache.org> on 2026/03/07 09:46:04 UTC
[PR] Fix DirectoryChecker.deregisterAll to close/delete all lock resources [iotdb]
iamsanjaymalakar opened a new pull request, #17267:
URL: https://github.com/apache/iotdb/pull/17267
## Description
- Fix `DirectoryChecker#deregisterAll()` so cleanup doesn’t stop on the first `IOException`.
- Close all `RandomAccessFile` instances (releasing file locks) and then attempt deleting all lock files, even if earlier closes/deletes fail.
- Aggregate failures by keeping the first `IOException` and suppressing subsequent ones; log once at the end if any failures occurred.
<hr>
This PR has:
* [x] been self-reviewed.
* [ ] added documentation for new or modified features or behaviors.
* [ ] added Javadocs for most classes and all non-trivial methods.
* [ ] added or updated version, **license**, or notice information
* [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
* [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage.
* [ ] added integration tests.
* [ ] been tested in a test IoTDB cluster.
<hr>
##### Key changed/added classes (or packages if there are too many classes) in this PR
* `org.apache.iotdb.db.storageengine.rescon.disk.DirectoryChecker`
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix DirectoryChecker.deregisterAll to close/delete all lock resources [iotdb]
Posted by "iamsanjaymalakar (via GitHub)" <gi...@apache.org>.
iamsanjaymalakar commented on PR #17267:
URL: https://github.com/apache/iotdb/pull/17267#issuecomment-5407809187
Requesting review on this one. Also flagging a possible compile issue: the final `logger.warn("Failed to deregister one or more file locks: {}", e.getMessage(), e)` references `e`, which isn't in scope there — should probably be `first`.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org