fix: release database lock during file I/O in cleanup_deleted#286
Closed
laynepenney wants to merge 1 commit intomainfrom
Closed
fix: release database lock during file I/O in cleanup_deleted#286laynepenney wants to merge 1 commit intomainfrom
laynepenney wants to merge 1 commit intomainfrom
Conversation
- Collect file paths first (no lock) - Only acquire lock briefly for delete operations - Avoids blocking file system checks under lock - Zero warnings, all 516 tests pass
Collaborator
Author
|
Closing this PR. After further review, the lock contention 'fix' is unnecessary - the original code from PR #285 is acceptable for a manual maintenance operation. The 'fix' introduced redundant queries and unnecessary complexity for a theoretical problem that doesn't exist in practice. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes lock contention issue identified in PR #285 code review.
Problem
In
cleanup_deleted(), the database lock was held during file system operations:This blocks other operations from accessing the database during file system checks.
Solution
Refactored to release the lock during file I/O:
Changes
Verification
Related