Skip to content

Fix DirectoryChecker.deregisterAll to close/delete all lock resources#17267

Open
iamsanjaymalakar wants to merge 1 commit intoapache:masterfrom
iamsanjaymalakar:master
Open

Fix DirectoryChecker.deregisterAll to close/delete all lock resources#17267
iamsanjaymalakar wants to merge 1 commit intoapache:masterfrom
iamsanjaymalakar:master

Conversation

@iamsanjaymalakar
Copy link

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.


This PR has:

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

Key changed/added classes (or packages if there are too many classes) in this PR
  • org.apache.iotdb.db.storageengine.rescon.disk.DirectoryChecker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant