Skip to content

PSS: Fixes VFS workers to close root on error#94

Merged
iamandrii merged 1 commit into
mainfrom
m-93-mtx-leak-fix
Jun 9, 2025
Merged

PSS: Fixes VFS workers to close root on error#94
iamandrii merged 1 commit into
mainfrom
m-93-mtx-leak-fix

Conversation

@iamandrii
Copy link
Copy Markdown
Contributor

Closes #93.

Ensures the vfs root is closed when an error occurs during file operations
in vfs workers, preventing potential resource leaks.
@iamandrii iamandrii requested a review from Copilot June 9, 2025 21:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors VFS worker methods to extract the root handle and ensure it’s closed when an open operation fails.

  • Pulls p.vfs.Root(...) into a root variable for reuse.
  • Adds root.CloseCtx calls in error branches of vfsReadFile.execute and vfsAddFile.execute.

Comment thread internal/pss/vfs_workers.go
Comment thread internal/pss/vfs_workers.go
@iamandrii iamandrii merged commit 0e91abb into main Jun 9, 2025
3 checks passed
@iamandrii iamandrii deleted the m-93-mtx-leak-fix branch June 9, 2025 21:24
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.

PSS: Read mutex leak after a lot of operations

2 participants