mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #1995] [MERGED] Improved to avoid unnecessary head request #2293
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#2293
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/1995
Author: @ggtakec
Created: 7/22/2022
Status: ✅ Merged
Merged: 7/27/2022
Merged by: @gaul
Base:
master← Head:improve_multihead📝 Commits (1)
37ad2a5Improved to avoid unnecessary head request📊 Changes
6 files changed (+80 additions, -37 deletions)
View changed files
📝
src/cache.h(+4 -0)📝
src/curl.cpp(+12 -6)📝
src/curl.h(+3 -3)📝
src/curl_multi.cpp(+9 -2)📝
src/curl_multi.h(+4 -2)📝
src/s3fs.cpp(+48 -24)📄 Description
Relevant Issue (if applicable)
n/a
Details
Fixed the
readdir_multi_headfunction called froms3fs_readdirbecause it is inefficient.This fixes an inefficiency if the stat cache was cached out during the processing of
readdir_multi_head.readdir_multi_headuses afiller(FUSE param) to return a list of files and directories stat returned bylist_bucket.At this time, even though the files and directories returned by
list_bucketexisted in the stat cache, s3fs was always sending a HEAD request.Also, HEAD requests are processed in parallel, and those results are stored in the stat cache.
And
readdir_multi_headreads the value from the stat cache after all request finished.When the number of stat caches is small and stat cache of those result is out, s3fs requests HEADs which are unnecessary processing.
So
readdir_multi_headpasses its value to the filler as is, if it exists in the stat cache.Also, the result of the HEAD request is passed to the filler without going through stat cache.(but it will be cached to stat)
This will reduce unnecessary HEAD requests and improve performance. (depending on the stat cache conditions)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.