HDDS-9335. OMKeyDeleteRequest using the wrong bucket layout#5341
HDDS-9335. OMKeyDeleteRequest using the wrong bucket layout#5341sumitagrawl merged 5 commits intoapache:masterfrom
Conversation
|
Looks correct to me, but I'll also let someone who knows more about OM comment. |
|
Thanks for the patch. I noticed there are some inconsistencies in the usage of bucket layout in the request. OmKeyInfo omKeyInfo =
omMetadataManager.getKeyTable(bucketLayout).get(objectKey);and omMetadataManager.getKeyTable(getBucketLayout()).addCacheEntry(
new CacheKey<>(
omMetadataManager.getOzoneKey(volumeName, bucketName, keyName)),
CacheValue.get(trxnLogIndex));The first one uses the |
sumitagrawl
left a comment
There was a problem hiding this comment.
@guohao-rosicky Thanks for working over this,
bucketLayout used here is only to get respective Table: fileTable or keyTable (based on bucket type), so using DEFAULT or OBS (as provided in constructor) does not have any impact to functionality.
To avoid confusion from code perspective, this changes seems good.
Additionally, IMO, we can remove method with passing bucketLayout and merge both, as below is used only in UT cases and getBucketLayout() itself can be used with no impact.
Thanks @sodonnel @ivandika3 @hemantk-12 @sumitagrawl for the review, I think it's a good idea. I'll modify it. |
|
@guohao-rosicky Plz fix UT cases as impact of changes |
Thanks for the review @sumitagrawl, PTAL. |
sumitagrawl
left a comment
There was a problem hiding this comment.
@guohao-rosicky LGTM +1
What changes were proposed in this pull request?
OMKeyDeleteRequest using the wrong bucket layout
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9335
How was this patch tested?
existing UT