jojochuang commented on code in PR #7436:
URL: https://github.com/apache/ozone/pull/7436#discussion_r1966344268


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -1592,17 +1592,22 @@ private PersistedUserVolumeInfo getVolumesByUser(String 
userNameKey)
    * @throws IOException
    */
   public PendingKeysDeletion getPendingDeletionKeys(final int keyCount,
-                             OmSnapshotManager omSnapshotManager)
+      final String startKey, OmSnapshotManager omSnapshotManager)
       throws IOException {
     List<BlockGroup> keyBlocksList = Lists.newArrayList();
     HashMap<String, RepeatedOmKeyInfo> keysToModify = new HashMap<>();
+    String lastKey = "";
     try (TableIterator<String, ? extends KeyValue<String, RepeatedOmKeyInfo>>
              keyIter = getDeletedTable().iterator()) {
+      if (!Strings.isNullOrEmpty(startKey)) {
+        keyIter.seek(startKey);

Review Comment:
   We should eliminate this seek() and specify startKey in the iterator 
constructor to avoid a seekToFirst() call.



-- 
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-unsubscr...@ozone.apache.org

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


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

Reply via email to