hanishakoneru commented on a change in pull request #504: HDDS-2953. Handle replay of S3 requests URL: https://github.com/apache/hadoop-ozone/pull/504#discussion_r374931123
########## File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadAbortRequest.java ########## @@ -116,36 +122,51 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, throw new OMException("Abort Multipart Upload Failed: volume: " + volumeName + "bucket: " + bucketName + "key: " + keyName, OMException.ResultCodes.NO_SUCH_MULTIPART_UPLOAD_ERROR); - } else { - multipartKeyInfo = omMetadataManager - .getMultipartInfoTable().get(multipartKey); - - multipartKeyInfo.setUpdateID(transactionLogIndex); - - // Update cache of openKeyTable and multipartInfo table. - // No need to add the cache entries to delete table, as the entries - // in delete table are not used by any read/write operations. - omMetadataManager.getOpenKeyTable().addCacheEntry( - new CacheKey<>(multipartKey), - new CacheValue<>(Optional.absent(), transactionLogIndex)); - omMetadataManager.getMultipartInfoTable().addCacheEntry( - new CacheKey<>(multipartKey), - new CacheValue<>(Optional.absent(), transactionLogIndex)); } - omClientResponse = new S3MultipartUploadAbortResponse(multipartKey, - multipartKeyInfo, + // Check the OpenKeyTable if this transaction is a replay of ratis logs. + if (isReplay(ozoneManager, omKeyInfo.getUpdateID(), trxnLogIndex)) { Review comment: I see what you are saying now. MultipartUploadID would be unique even for the same keys for different initiates. Is that correct? If yes, ya we can remove this check here. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org