errose28 commented on code in PR #3411:
URL: https://github.com/apache/ozone/pull/3411#discussion_r875125881
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMOpenKeysDeleteRequest.java:
##########
@@ -188,4 +197,46 @@ private void updateOpenKeyTableCache(OzoneManager
ozoneManager,
}
}
+ /**
+ * Validates open keys delete requests.
+ * We do not want to allow older clients to delete open keys in buckets which
+ * use non LEGACY layouts.
+ *
+ * @param req - the request to validate
+ * @param ctx - the validation context
+ * @return the validated request
+ * @throws OMException if the request is invalid
+ */
+ @RequestFeatureValidator(
+ conditions = ValidationCondition.OLDER_CLIENT_REQUESTS,
+ processingPhase = RequestProcessingPhase.PRE_PROCESS,
+ requestType = Type.DeleteOpenKeys
+ )
+ public static OMRequest blockDeleteOpenKeysWithBucketLayoutFromOldClient(
Review Comment:
This one is also not submitted by the client, so we probably don't need to
block it.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java:
##########
@@ -72,4 +83,47 @@ public OMClientResponse validateAndUpdateCache(OzoneManager
ozoneManager,
return omClientResponse;
}
+ /**
+ * Validates key purge requests.
+ * We do not want to allow older clients to purge keys in buckets which use
+ * non LEGACY layouts.
+ *
+ * @param req - the request to validate
+ * @param ctx - the validation context
+ * @return the validated request
+ * @throws OMException if the request is invalid
+ */
+ @RequestFeatureValidator(
+ conditions = ValidationCondition.OLDER_CLIENT_REQUESTS,
+ processingPhase = RequestProcessingPhase.PRE_PROCESS,
+ requestType = Type.PurgeKeys
+ )
+ public static OMRequest blockPurgeKeysWithBucketLayoutFromOldClient(
Review Comment:
This is an internal request submitted directly to Ratis by the OM. I don't
think we need to block this.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]