Skip to content

Conversation

@bharatviswa504
Copy link
Contributor

What changes were proposed in this pull request?

  1. The cache of the key should be updated in ValidateAndUpdateCache, as we return response once after adding to cache, and before DoubleBuffer flushes to disk using OmClientResponse#addToDBBatch.
  2. Changed return type of DeleteKeysResponse, as anyway when success we are not returning delete list and also when failure, we fail complete batch. So we can just return status.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-3930

Please replace this section with the link to the Apache JIRA)

How was this patch tested?

Added tests

@bharatviswa504 bharatviswa504 changed the title Hdds 3930 HDDS-3930. Fix OMKeyDeletesRequest. Jul 10, 2020
@xiaoyuyao
Copy link
Contributor

Thanks @bharatviswa504 for the update. LGTM, +1 from me.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bharatviswa504 for updating the patch. Looks mostly good, only 2 minor comments.

Comment on lines 209 to 211
LOG.error("Keys delete failed. Volume:{}, Bucket:{}, DeletedKey:{}, " +
"UnDeletedKeys:{}", volumeName, bucketName, keyName,
auditMap.get(DELETED_KEYS_LIST), auditMap.get(UNDELETED_KEYS_LIST),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More arguments (not counting exception) than placeholders:

Suggested change
LOG.error("Keys delete failed. Volume:{}, Bucket:{}, DeletedKey:{}, " +
"UnDeletedKeys:{}", volumeName, bucketName, keyName,
auditMap.get(DELETED_KEYS_LIST), auditMap.get(UNDELETED_KEYS_LIST),
LOG.error("Keys delete failed. Volume:{}, Bucket:{}, DeletedKeys:{}, " +
"UnDeletedKeys:{}", volumeName, bucketName,
auditMap.get(DELETED_KEYS_LIST), auditMap.get(UNDELETED_KEYS_LIST),

Comment on lines 208 to 209
if (LOG.isDebugEnabled()) {
LOG.error("Keys delete failed. Volume:{}, Bucket:{}, DeletedKey:{}, " +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: log level mismatch (isDebugEnabled vs. error).

@bharatviswa504
Copy link
Contributor Author

Thank You @adoroszlai for the review.
I have addressed review comments.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bharatviswa504 for updating the patch.

Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@bharatviswa504 bharatviswa504 merged commit 34404f3 into apache:master Jul 14, 2020
@bharatviswa504
Copy link
Contributor Author

Thank You @adoroszlai @xiaoyuyao and @smengcl for the review.

rakeshadr pushed a commit to rakeshadr/hadoop-ozone that referenced this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants