nandakumar131 commented on code in PR #7794:
URL: https://github.com/apache/ozone/pull/7794#discussion_r1940633548


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -2142,9 +2139,7 @@ public DeleteKeysResult getPendingDeletionSubFiles(long 
volumeId,
 
     Table fileTable = metadataManager.getFileTable();
     try (TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>>
-        iterator = fileTable.iterator()) {
-
-      iterator.seek(seekFileInDB);
+        iterator = fileTable.iterator(seekFileInDB)) {

Review Comment:
   @sadanand48 we are not removing the `seek` here. We are optimizing the 
`seek` by doing it as part of `Iterator` creation.
   
   Without this optimization, the `Iterator` creation will do `seekToFirst` and 
then in the next line we are performing `iterator#seek`. This just avoids the 
`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