-
Notifications
You must be signed in to change notification settings - Fork 21
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
[BUG] rgw/sfs: SFSBucket::merge_and_store_attrs should not drop entries not defined in the new_attrs #750
Comments
@giubacc can you provide something that reproduces the behavior, or a set of commands with the final expected state? |
Example: supposing
and
calling the method produces:
but, given that this should be a merge the set should be this:
I haven't a concrete case to report, I stumbled into that code accidentally when looking another thing. |
Thanks. This sounds like a potentially low-hanging fruit, so lets see if we can handle it soon. |
Well, I've gone in depth into this and the true reality is that the method: For example, consider this fragment from
The merge as intended in my previous comment is not the case. |
Invalid |
Refactored with a set_and_store_attrs semantics. The previous implementation was started as if the method should implement a merge but the actual usage suggests set semantics. The new implementation is more concise and simplified. Related to: https://github.com/aquarist-labs/s3gw/issues/750 Signed-off-by: Giuseppe Baccini <[email protected]>
In
SFSBucket::merge_and_store_attrs
we should drop this block:The method should only
merge
and notset
the new attributes into the current attributes.The text was updated successfully, but these errors were encountered: