hanishakoneru commented on a change in pull request #448: HDDS-2870. Handle
replay of KeyCreate requests.
URL: https://github.com/apache/hadoop-ozone/pull/448#discussion_r377304745
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java
##########
@@ -254,36 +294,88 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager,
OmBucketInfo bucketInfo = omMetadataManager.getBucketTable().get(
omMetadataManager.getBucketKey(volumeName, bucketName));
encryptionInfo = getFileEncryptionInfo(ozoneManager, bucketInfo);
- omKeyInfo = prepareKeyInfo(omMetadataManager, keyArgs,
- omMetadataManager.getOzoneKey(volumeName, bucketName,
- keyName), keyArgs.getDataSize(), locations,
- encryptionInfo.orNull(), ozoneManager.getPrefixManager(),
- bucketInfo, transactionLogIndex);
-
- omClientResponse = prepareCreateKeyResponse(keyArgs, omKeyInfo,
- locations, encryptionInfo.orNull(), exception,
- createFileRequest.getClientID(), transactionLogIndex, volumeName,
- bucketName, keyName, ozoneManager,
- OMAction.CREATE_FILE, ozoneManager.getPrefixManager(), bucketInfo);
+
+ omKeyInfo = prepareKeyInfo(omMetadataManager, keyArgs, dbKeyInfo,
+ keyArgs.getDataSize(), locations, encryptionInfo.orNull(),
+ ozoneManager.getPrefixManager(), bucketInfo, trxnLogIndex);
+
+ long openVersion = omKeyInfo.getLatestVersionLocations().getVersion();
Review comment:
When i move the append blocks code inside prepareKeyInfo, it breaks
multiplartUpload. TestOzoneSecure#testMultipartUploadOverride() fails because
of this. This was done as part of HDDS-2944.
So going to keep append blocks outside the prepareKeyInfo() function.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]