[PR #2127] [MERGED] Added cache clearing on upload error #2346

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

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2127
Author: @ggtakec
Created: 3/12/2023
Status: Merged
Merged: 3/13/2023
Merged by: @ggtakec

Base: masterHead: clear_cache


📝 Commits (1)

  • abb4649 Added cache clearing on upload error

📊 Changes

1 file changed (+8 additions, -0 deletions)

View changed files

📝 src/fdcache_entity.cpp (+8 -0)

📄 Description

Relevant Issue (if applicable)

#2120

Details

After an error occurred on the server side during file upload(Flush) processing, there are reports(#2120) that the contents of the file cannot be read correctly.

If the upload fails in an environment that uses cache, the local cache may have been updated even though the object on the server side has not been updated.
Even in this state, subsequent reading may be performed normally (maybe reloading due to inconsistency in stat information), but Issue #2120 seems to cause inconsistency.

If the upload fails, the local cache is in a correct state (not matching the server side) and cannot be repaired.
Therefore, I modified it to clear the cache if it fails.

@gaul
Since this PR only clears the cache, I think it won't impact anything else.
So, if the tests pass, I think I'll merge this PR in no time(probably after issuer's review).
If you have any problems please let me know.


🔄 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/2127 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 3/12/2023 **Status:** ✅ Merged **Merged:** 3/13/2023 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `clear_cache` --- ### 📝 Commits (1) - [`abb4649`](https://github.com/s3fs-fuse/s3fs-fuse/commit/abb4649eb44e0fdae34f8b4da1c5f042576f143d) Added cache clearing on upload error ### 📊 Changes **1 file changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/fdcache_entity.cpp` (+8 -0) </details> ### 📄 Description ### Relevant Issue (if applicable) #2120 ### Details After an error occurred on the server side during file upload(Flush) processing, there are reports(#2120) that the contents of the file cannot be read correctly. If the upload fails in an environment that uses cache, the local cache may have been updated even though the object on the server side has not been updated. Even in this state, subsequent reading may be performed normally (maybe reloading due to inconsistency in stat information), but Issue #2120 seems to cause inconsistency. If the upload fails, the local cache is in a correct state (not matching the server side) and cannot be repaired. Therefore, I modified it to clear the cache if it fails. @gaul Since this PR only clears the cache, I think it won't impact anything else. So, if the tests pass, I think I'll merge this PR in no time(probably after issuer's review). If you have any problems please let me know. --- <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:04 +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#2346
No description provided.