sadanand48 commented on code in PR #7794:
URL: https://github.com/apache/ozone/pull/7794#discussion_r1940547764
##########
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:
seek is not redundant here, say the table has millions of entries and the
required keys are at the end, removing the seek would cause it to go over all
these keys. Do we have a valid explanation of seek being costlier than actual
iteration?
--
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]