errose28 commented on code in PR #6219:
URL: https://github.com/apache/ozone/pull/6219#discussion_r1499906912
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -1051,4 +1057,11 @@ protected void filterOutBlocksStillInUse(OmKeyInfo
referenceKey,
LOG.debug("After block filtering, keysToBeFiltered = {}",
keysToBeFiltered);
}
+
+ protected void validateEncryptionKeyInfo(OmBucketInfo bucketInfo, KeyArgs
keyArgs) throws OMException {
+ if (bucketInfo.getEncryptionKeyInfo() != null &&
!keyArgs.hasFileEncryptionInfo()) {
+ throw new OMException("Attempting to create unencrypted file " +
+ keyArgs.getKeyName() + " in encrypted bucket " +
keyArgs.getBucketName(), INTERNAL_ERROR);
Review Comment:
Can we use a different error code here (maybe a new one?) While the cause of
this issue would be a bug inside the OM, INTERNAL_ERROR and METADATA_ERROR
cause the OM to crash. So if we hit a bug in this code path, the whole cluster
will be inoperable until patched. Probably better to fail the request so we can
identify the error, but leave the OMs running.
--
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]