mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
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#1873
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/1209
Author: @ggtakec
Created: 11/26/2019
Status: ✅ Merged
Merged: 1/13/2020
Merged by: @gaul
Base:
master← Head:symlink_cache📝 Commits (1)
6a85e27In memory cache for softlinks with cache out📊 Changes
5 files changed (+282 additions, -51 deletions)
View changed files
📝
doc/man/s3fs.1(+3 -3)📝
src/cache.cpp(+181 -3)📝
src/cache.h(+42 -9)📝
src/s3fs.cpp(+48 -30)📝
src/s3fs_util.cpp(+8 -6)📄 Description
Relevant Issue (if applicable)
#1168
Details
This PR is #1164 suggested by @AgrawalAmey.
It incorporates a symbolic link cache, and this PR is added the cash out mechanism.
The symlink caching method is the same as suggested by @AgrawalAmey.
The contents including cash out are shown below.
Cache contents
Cache the link destination path using the file path of the symbolic link as a key.
The cache time and reference count are also stored as cache data.
These additional elements are just like the Stats cache.
Cache size, expiration date, cash out
I decided to use Stats cache options for this cache size, expiration date, and cashout.
In other words, the symbolic link cache coexists with Stats cache and exists in the class that implements the Stats cache.
This is because s3fs implements symbolic links as S3 objects(files), but it does not exist as a file system.
Therefore, it is easier to implement a simple cache than to modify fdcache (or prepare an equivalent).
Also, when considering the mechanism of cashout, the same implementation as Stats cache makes it easier to implement and show to users.
The Stats cache settings max_stat_cache_size, stat_cache_expire, and stat_cache_interval_expire are shared with this symbolic link cache.
(The maximum number of Stats caches and symbolic links is the number specified by max_stat_cache_size, respectively)
Cash in, out
A symbolic link cache is created when a symbolic link is created. (At this time, the Stats cache is cached out)
The Stats cache for symbolic link files is not synchronized with the creation and access of symbolic link files. (Same as before)
When deleting a symbolic link, both the symbolic link and the Stats cache are deleted.
Thanks to @AgrawalAmey for great suggestions and PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.