prashantpogde commented on a change in pull request #1004:
URL: https://github.com/apache/hadoop-ozone/pull/1004#discussion_r434276194
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMKeyRenameResponse.java
##########
@@ -88,11 +88,22 @@ public void addToDBBatch(OMMetadataManager
omMetadataManager,
omMetadataManager.getOzoneKey(volumeName, bucketName, fromKeyName));
} else if (createToKeyAndDeleteFromKey()) {
// If both from and toKeyName are equal do nothing
- omMetadataManager.getKeyTable().deleteWithBatch(batchOperation,
- omMetadataManager.getOzoneKey(volumeName, bucketName, fromKeyName));
- omMetadataManager.getKeyTable().putWithBatch(batchOperation,
- omMetadataManager.getOzoneKey(volumeName, bucketName, toKeyName),
- newKeyInfo);
+ if (!toKeyName.equals(fromKeyName)) {
Review comment:
Yes, the check is there in createToKeyAndDeleteFromKey() and it is
redundant. I will remove the check from here and upload again.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]