Tejaskriya commented on code in PR #7794:
URL: https://github.com/apache/ozone/pull/7794#discussion_r1940633001
##########
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:
We are using a prefixed iterator instead of creating an iterator and then
seeking to the required position. So we won't be iterating over all the keys.
There are multiple instances in code
([example](https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java#L508C5-L510C35))
where we have done this without needing a seek.
--
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]