-
Notifications
You must be signed in to change notification settings - Fork 824
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
Add Attributes API Exposing Broader Set of Object Metadata #5334
Comments
Any thoughts @Xuanwo @wjones127 @Turbo87 @roeap @thinkharderdev @alamb? |
Interesting design!
If I have understood correctly, this collection doesn't provide api like Would you like to share more motivation about this design? I'm guessing you are trying to keep the struct size low. |
Sorry that's an omission on my part, we definitely would provide such an API, I was just thinking from the perspective of the implementations, who will just enumerate the collection |
Looks good in general, but I'm a little worried about the "store errors if it can't handle the attribute" part. In the crates.io codebase we're primarily using the S3 store, but for local dev we use the file store instead, and for testing we use in-memory. I'm wondering if something like an |
The intention is all attributes would be supported for all first-party stores. The erroring is only to give us space to add more without it being a breaking API change, or for making xattr an optional feature |
I see, sounds good to me then :) |
I would support this feature as well as I have seen some cases where people make heavy use of custom metadata who right would be blocked from adopting object store. |
It seems reasonable to be given what I understand of it -- maybe it would be worth a quick API PR sketch to see how major a change / breaking change it would be 🤔 |
I think this seems reasonable. I'm particularly interested in the encryption part at the moment.
This is appealing. I'm sure downstream libraries, including ours, would appreciate being able to add support for object store encryption without having to do this piecemeal for each cloud. IIUC, this API would require passing in encryption information for each request. In Lance, we might have this configured at the client level, but it doesn't seem unreasonable that we could do that in our |
We could definitely also support encryption options on the stores as well, or instead, I don't feel strongly |
Sounds good in general
Would we add another method like Also, certain attributes may be returned by
Is the idea that It's not the most elegent thing in the world but an explicit API for |
There wouldn't be a need, get_opts with GetOptions::head set to true will return a GetResult with the Attributes
They're actually remarkably consistent w.r.t this, in part as many are standard HTTP concepts, so it would just be this shared set. |
@tustvold What's the status of this? Is there some draft implementation to play with? Or should someone give writing it a try? |
I've not had time to work on this, and am unlikely to have time in the next few weeks. Happy for someone else to pick this up |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The current definition of
ObjectMeta
reflects the information returned by the various store listing APIs, however, this is an incomplete subset of the attributes of an object.A number of requests have been made to allow reading and writing a broader set of this data:
Cache-Control
header usage #4498Describe the solution you'd like
I would like a new struct called
Attributes
that is included onPutOptions
andGetResult
, containing an iterable collection of key-value pairs. The values would be typed asString
, and the keys would be a new enumeration calledAttribute
:ObjectStore
implementations would be expected to error on attributes they don't understand / aren't supported, and all attributes would be expected to round-trip. It is an expectation thatAttribute
would be supported by a majority of stores, i.e. we wouldn't look to support store-specific functionality through this mechanism.An optional feature flag would enable support for attributes in
LocalFileSystem
usingxattr
.Describe alternatives you've considered
I originally debated adding the ability to specify arbitrary headers in PutOptions, but this broke encapsulation and made it hard to use
ObjectStore
without knowing the concrete backing implementation. Whilst theAttribute
mechanism doesn't eliminate this issue, as not all implementations will support allAttribute
, but it at least avoids implementation code needing to know the particulars of how Azure vs AWS encode encryption information in request/response headers, or how Azure uses a different header to write vs read Content-Disposition (I have no idea why), etc...Additional context
We can't add
Attributes
toObjectMeta
as the listing APIs do not return this information.We can't merge
TagSet
withAttributes
as the tag set is only returned by special API calls.The text was updated successfully, but these errors were encountered: