smengcl commented on code in PR #11018:
URL: https://github.com/apache/ozone/pull/11018#discussion_r3827131506


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java:
##########
@@ -74,6 +74,11 @@ public final class OmKeyInfo extends WithParentObjectId
   // name of key client specified
   private String keyName;
   private long dataSize;
+  /**
+   * Block locations of the key, one group per key version. No write path 
produces more than one group today, so a
+   * key holds a single version and {@code dataSize} covers all of its blocks. 
Object versioning (HDDS-15728) keeps
+   * each object version in its own OmKeyInfo rather than adding groups here.
+   */
   private List<OmKeyLocationInfoGroup> keyLocationVersions;

Review Comment:
   It looks like the current write path can create more than one location 
group. 
   
   `testOverWriteKeyWithAndWithOutVersioning` enables versioning, overwrites a 
key through the client, and verifies that keyLocationVersions has two groups.
   
   `dataSize` contains only the latest version’s size. Therefore, quota repair 
can undercount used space.
   
   HDDS-15728 proposes a future layout, but it does not remove the current 
path. Pls remove this statement, or handle multiple groups.



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