-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add optional sidecar files for metadata #522
Conversation
1ca6ca3
to
2bd301a
Compare
Thank you very much for this PR, it's just what I need! (backing filesystem is beegfs without xattr) My initial tests of this PR show that it is working. The example invocation above is wrong, it doesn't understand Is there any chance this PR could be merged? |
I've merged current |
The main issue with this PR is that it can become out of sync somewhat unexpectedly. For instance if you upload a file through the gateway then change the file directly in the filesystem, the attributes (such as etag/checksum, etc) may be stale without any clear indication of why. And metadata could be orphaned if the file was directly deleted. Maybe this is fine if the use case is to only have access through the gateway. There is a file data version in scoutfs that we can check to see if inode/data_version changed and then throw out the potentially stale attrs. But I'm not aware of a generic way to support this for all filesystems. I could be convinced that this behavior is acceptable and just needs documentation on the caveats, but I was concerned about getting bug reports that metadata was getting reported for older versions of files in these cases. |
That's a valid concern. I think it could be addressed in one or more of:
|
Just commenting to say that I've rebased the changes from this PR so it is up-to-date with the main branch: SMI#1. The use-case @howff and I have necessitates read-only access to objects, so luckily (for us) we can avoid much of the detail around updates to objects and metadata. I wonder if this is a common enough case for a simpler implementation to be acceptable and easier to maintain? Something like If not, we would be happy to contribute clarifications and documentation as @howff suggests that would make the existing changes more palatable and minimise the maintenance burden. |
bcf5777
to
a2a9363
Compare
Since there is sufficient interest in this, I can fixup this PR and merge in. And I'll probably update documentation for this with the known caveats. I dont think this needs to be read only as long as the limitations are understood. |
000a20d
to
ff68b8c
Compare
ff68b8c
to
f6bd412
Compare
This adds the option to store metadata for objects and buckets within a specified directory: bucket: <sidecar dir>/<bucket>/meta/<attribute> object: <sidecar dir>/bucket/<object>/meta/<attribute> Example invocation: ./versitygw -a myaccess -s mysecret posix --sidecar /tmp/sidecar /tmp/gw The attributes are stored by name within the hidden directory.
f6bd412
to
4025172
Compare
This adds the option to store metadata for objects and buckets within a hidden folder alongside the bucket or object:
bucket: .vgw_meta.
object: .vgw_meta.
Example invocation:
./versitygw -a myaccess -s mysecret posix --sidecar /tmp/gw
The attributes are stored by name within the hidden directory.