You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "smengcl (via GitHub)" <gi...@apache.org> on 2026/08/21 03:52:59 UTC

Re: [PR] HDDS-16127. Document that OmKeyInfo holds a single key version [ozone]

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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org