HDDS-10840. Do not pass owner in keyargs when rewriting a key #6710
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
The "owner" field is only set at the OM server side when a new key is created. In the case a key is overwritten, the owner is never retrieved from the keyargs and hence overwriting the owner when overwriting a key is not possible. This is the case, both prior to the atomic key overwrite feature and when the traditional key overwrite where a new version is allocated.
Therefore this change should simply remove the owner details from being passed in the rewrite key and the owner will continue to be inherited as it is now.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10840
How was this patch tested?
Existing test modified to check the owner before and after are the same.