You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/02/04 21:05:11 UTC
[GitHub] [hadoop-ozone] hanishakoneru commented on a change in pull request
#504: HDDS-2953. Handle replay of S3 requests
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_r374921975
##########
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:
If the openKey was created after this transaction, then it is safe to assume that this is a replay.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org