ChenSammi commented on code in PR #6273:
URL: https://github.com/apache/ozone/pull/6273#discussion_r1503678863


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -775,6 +777,16 @@ protected OmKeyInfo prepareFileInfo(
       dbKeyInfo.setModificationTime(keyArgs.getModificationTime());
       dbKeyInfo.setUpdateID(transactionLogIndex, isRatisEnabled);
       dbKeyInfo.setReplicationConfig(replicationConfig);
+
+      // Construct new metadata map from KeyArgs
+      List<KeyValue> keyValueList = keyArgs.getMetadataList();
+      Map<String, String> newMetadata = new HashMap<>();
+      for (KeyValue keyValue : keyValueList) {
+        newMetadata.put(keyValue.getKey(), keyValue.getValue());
+      }
+
+      updateMetadata(dbKeyInfo, newMetadata);

Review Comment:
   @ArafatKhan2198 , thanks working on this. It looks like encInfo is not 
updated in this case too.  Could you help to verify that? If it's true, we can 
file new JIRA to fix that. 



-- 
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]

Reply via email to