mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2707] [MERGED] Improved stat cache efficiency by not delete but only register #2726
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2726
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/s3fs-fuse/s3fs-fuse/pull/2707
Author: @ggtakec
Created: 8/21/2025
Status: ✅ Merged
Merged: 9/11/2025
Merged by: @gaul
Base:
master← Head:improve/3_reduce_head📝 Commits (1)
70483e3Improved stat cache efficiency by not delete but only register📊 Changes
7 files changed (+389 additions, -113 deletions)
View changed files
📝
src/cache.cpp(+28 -10)📝
src/cache.h(+2 -0)📝
src/fdcache_entity.cpp(+16 -0)📝
src/fdcache_entity.h(+5 -0)📝
src/metaheader.cpp(+45 -0)📝
src/metaheader.h(+1 -0)📝
src/s3fs.cpp(+292 -103)📄 Description
Relevant Issue (if applicable)
#2706
Details
Currently, after a file(object) operation, the stat cache would be always deleted and a HEAD request would be sent the next time the file(object) was accessed.
However, by changing this specification and updating only the stat information in stat cache (and deleting only the meta header), the number of HEAD requests sent can be reduced for operations that only require stat information.
(Memo: The stat cache caches both meta header and stat information.)
When meta header information is needed, a HEAD request is sent and the stat cache is updated.
In s3fs-fuse CI testing, it was little effect, but we did confirm a reduction in the number of HEAD requests when starting s3fs with the default options manually.
This PR is one in a series of enhancements using Stat Cache following #2706. (The PRs have been separated into smaller PRs.)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.