mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2283] [MERGED] Added std::map erase before calling emplace in xattrs operations #2444
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#2444
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/2283
Author: @ggtakec
Created: 8/19/2023
Status: ✅ Merged
Merged: 8/20/2023
Merged by: @gaul
Base:
master← Head:fix_emplace📝 Commits (1)
e08e049Reverted to direct array access instead of std::map emplace📊 Changes
2 files changed (+6 additions, -3 deletions)
View changed files
📝
src/s3fs.cpp(+2 -3)📝
test/integration-test-main.sh(+4 -0)📄 Description
Relevant Issue (if applicable)
#2280
Details
std::map emplacewill not replace the value if that key exists.Fixed xattrs handling to call
eraseif there is a target key.I also added a test case for the missing xattrs inspection related to this.
Check where emplace is used in the current source code, and there is no problem except for xattrs.
(In the
stat cacheprocess, the keys are deleted in advance, so I don't think there will be any problems.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.