[PR #2376] [MERGED] Corrected list_bucket to search in stat cache during creating new file #2510

Closed
opened 2026-03-04 02:05:54 +03:00 by kerem · 0 comments
Owner

📋 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: masterHead: fix_listbucket


📝 Commits (1)

  • 836f83f Corrected 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-byte file 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 found errors in case s3fs receives an instruction to get the file's stat information.

The problem in #2372 is similar to this, but the readdir was received during a delayed period.
Because this readdir (list bucket) is not supported, some macos12 tests 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.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2376 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 11/19/2023 **Status:** ✅ Merged **Merged:** 1/24/2024 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `fix_listbucket` --- ### 📝 Commits (1) - [`836f83f`](https://github.com/s3fs-fuse/s3fs-fuse/commit/836f83fbb54f7560d70e70d726db8f3112d3bb59) Corrected list_bucket to search in stat cache during creating new file ### 📊 Changes **3 files changed** (+172 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `src/cache.cpp` (+152 -46) 📝 `src/cache.h` (+15 -2) 📝 `src/s3fs.cpp` (+5 -3) </details> ### 📄 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-byte` file 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 found` errors in case s3fs receives an instruction to get the file's stat information. The problem in #2372 is similar to this, but the `readdir` was received during a delayed period. Because this `readdir` (`list bucket`) is not supported, some `macos12` tests 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:05:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2510
No description provided.