mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2376] [MERGED] Corrected list_bucket to search in stat cache during creating new file #2510
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#2510
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/2376
Author: @ggtakec
Created: 11/19/2023
Status: ✅ Merged
Merged: 1/24/2024
Merged by: @ggtakec
Base:
master← Head:fix_listbucket📝 Commits (1)
836f83fCorrected list_bucket to search in stat cache during creating new file📊 Changes
3 files changed (+172 additions, -51 deletions)
View changed files
📝
src/cache.cpp(+152 -46)📝
src/cache.h(+15 -2)📝
src/s3fs.cpp(+5 -3)📄 Description
Relevant Issue (if applicable)
#2372
#2198
Details
#2198 supported
macos fuse-t, but the bug in #2372 remained, so fixed it.About bug
When creating a new file, s3fs does not create a
0-bytefile and delays the upload until the file is flushed.During this delayed period, s3fs creates a temporary cache in the Stat cache to avoid
file not founderrors in case s3fs receives an instruction to get the file's stat information.The problem in #2372 is similar to this, but the
readdirwas received during a delayed period.Because this
readdir(list bucket) is not supported, somemacos12tests are failing as a bug.Correspondence
When registering temporary cache information in the Stat cache for a new file, use the file's parent directory as a key and retain the cache information that maps the file name list.
This mapping information exists until the temporary cache is deleted.
By using this temporary cache, s3fs can support
readdir(list bucket) and avoid problems.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.