-
Notifications
You must be signed in to change notification settings - Fork 10
rgw/sfs: refactor of SFSBucket::merge_and_store_attrs() #244
rgw/sfs: refactor of SFSBucket::merge_and_store_attrs() #244
Conversation
47bcffb
to
965045d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it just needs code documentation. Otherwise lgtm.
ok, I will add a comment explaining a bit our current state of understanding regarding this. |
965045d
to
a1d138d
Compare
set semantics: This confused me on first read. You mean set as in setter not as in set theory, right? Suggest to use 'overwrite' in the docstring / commit message |
The base class doc string says
My read of the usage in rgw_op.h would be the same. Usually the code adds one or more attributes to the existing set of attributes. Why is overwriting the attr map the correct behavior? |
This is my final thought after reaching the end of this: https://github.com/aquarist-labs/s3gw/issues/750 Honestly, reading this specification:
I have doubts that implementing this as a |
a1d138d
to
5fb9ecd
Compare
To be honest, I'm more concerned about getting the right behavior than doing things just to have s3-tests passing. It seems to me that what was documented in the SAL and what is expected are two different things. One of them is a bug. I'm inclined to believing that the documentation is wrong, as well as the function name, because the s3-tests seem to expect a different behavior than what is described. I think for us to merge this we will need a better explanation in our implementation's documentation. We need to provide context to justify what we are doing, other than just saying that Think about it this way: the whole team leaves the project, and whomever comes along will need to understand why this is being used as a setter. The documentation on the SAL is not agreeing with our assertion. There must be more context given to that person/AI so they understand what the problem is. Once we provide more context on this, I think we can merge the PR. |
Me too, the whole issue has started because a piece of code was added a certain point and has transformed this
Yup, I'm inclined to think this is just a SAL method-name and SAL documentation issue.
You are right, these are exactly my same considerations, but keep in mind that the current code we have is far worst that the patch / comment we would like to introduce with this patch. |
Right, but it can be better. We can actually convey our current understanding. I'm just asking for a more detailed explanation on our current rationale.
I believe asking for said clarification is reasonable, but I also think adding more context before merging this and leave it consigned to oblivion would be reasonable as well. The two are not mutually exclusive. |
5fb9ecd
to
6f4a16a
Compare
Refactored with an "overwrite" semantics. The previous implementation was started as if the method should implement a merge but the actual usage suggests "overwrite" semantics. The new implementation is more concise and simplified. Fixes: https://github.com/aquarist-labs/s3gw/issues/798 Signed-off-by: Giuseppe Baccini <[email protected]>
6f4a16a
to
dcf6a24
Compare
Refactored
SFSBucket::merge_and_store_attrs()
with "overwrite" semantics.The previous implementation was started as if the method should implement a merge but the actual usage suggests "overwrite" semantics.
The new implementation is more concise and simplified.
Fixes: https://github.com/aquarist-labs/s3gw/issues/798
Signed-off-by: Giuseppe Baccini [email protected]
Contribution Guidelines
Checklist