xiaoyuyao commented on a change in pull request #1766:
URL: https://github.com/apache/ozone/pull/1766#discussion_r573252307
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java
##########
@@ -546,6 +546,39 @@ protected void generateRequiredEncryptionInfo(KeyArgs
keyArgs,
}
}
+ protected void getFileEncryptionInfoForMpuKey(KeyArgs keyArgs,
+ KeyArgs.Builder newKeyArgs, OzoneManager ozoneManager)
+ throws IOException {
+
+ String volumeName = keyArgs.getVolumeName();
+ String bucketName = keyArgs.getBucketName();
+
+ boolean acquireLock = false;
+ OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
+
+ if (ozoneManager.getKmsProvider() != null) {
+ try {
+ acquireLock = omMetadataManager.getLock().acquireReadLock(
Review comment:
Can we move the acquireReadLock outside try block?
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]