You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/05/06 00:24:12 UTC

[GitHub] [ozone] errose28 commented on a diff in pull request #3226: HDDS-6491. Support FSO keys in getExpiredOpenKeys

errose28 commented on code in PR #3226:
URL: https://github.com/apache/ozone/pull/3226#discussion_r866364391


##########
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto:
##########
@@ -1027,6 +1027,7 @@ message OpenKeyBucket {
 message OpenKey {
   required string name = 1;
   required uint64 clientID = 2;
+  optional uint64 parentID = 3;

Review Comment:
   Why are we tracking parent ID here, instead of just putting the open key DB name as the name field? [This comment](https://github.com/apache/ozone/pull/3226#discussion_r843435126) made it sound like we were just tracking the name as it appears in the open key/file table. Also I think we would need a field to indicate which table (key or file) this key must be retrieved from.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -585,6 +587,12 @@ public String getOpenKey(String volume, String bucket,
     return openKey;
   }
 
+  private static long getClientID(String dbOpenKeyName) {
+    int beginIndex = dbOpenKeyName.lastIndexOf(OM_KEY_PREFIX) + 1;
+    String clientID = dbOpenKeyName.substring(beginIndex);
+    return Long.parseLong(clientID);

Review Comment:
   I'm not sure client ID is always a long. I've seen strings used in tests at least. Can we leave it as a string?



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