mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #438] [MERGED] fix: avoid nested image state read locks during writes #440
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#440
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/438
Author: @huang-jl
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @yingdi-shan
Base:
main← Head:hjl/fix-image-file-nested-read-lock📝 Commits (1)
b74a523fix: avoid nested image state read locks during writes📊 Changes
1 file changed (+99 additions, -13 deletions)
View changed files
📝
storage/overlaybd/src/image/image_file.rs(+99 -13)📄 Description
What
Reuse the existing state read guard when refreshing size metadata after writes, discards, and truncations, including io-uring write paths. Inline
refresh_size_metadata()intosize()and add a deterministic regression test.Why
Tokio’s fair
RwLockqueues new readers behind waiting writers. Previously, these operations held a read lock while requesting another, which could deadlock if a snapshot queued a write lock between them. Reusing the existing guard removes that circular wait while keeping the operation and metadata update protected.Design and behavior changes
No behavior changes for users.
Compatibility and operations
No compatibility issues.
Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketarget🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.