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 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.
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneAtRestEncryption.java:
##########
@@ -520,12 +580,21 @@ private void
testMultipartUploadWithEncryption(OzoneBucket bucket,
private void testMultipartUploadWithEncryption(OzoneBucket bucket,
int numParts, boolean isStream) throws Exception {
+ testMultipartUploadWithEncryption(bucket, numParts, false, false);
+ }
Review Comment:
Callers of this method in other parts of the test are passing `isStream` as
true and false, but their inputs are now always being converted to `false`, so
there's no testing of MPU with streaming.
--
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]