adoroszlai commented on code in PR #4468:
URL: https://github.com/apache/ozone/pull/4468#discussion_r1150115168
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/LegacyBucketHandler.java:
##########
@@ -141,31 +139,34 @@ public long calculateDUUnderObject(long parentId)
}
String[] seekKeys = seekPrefix.split(OM_KEY_PREFIX);
- iterator.seek(seekPrefix);
- // handle direct keys
- while (iterator.hasNext()) {
- Table.KeyValue<String, OmKeyInfo> kv = iterator.next();
- String dbKey = kv.getKey();
- // since the RocksDB is ordered, seek until the prefix isn't matched
- if (!dbKey.startsWith(seekPrefix)) {
- break;
- }
+ try (TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>>
+ iterator = keyTable.iterator()) {
Review Comment:
Thanks @neils-dev, I have missed those. Now updated.
--
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]