priyeshkaratha commented on code in PR #9904:
URL: https://github.com/apache/ozone/pull/9904#discussion_r2928941624
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStoreAbstractIterator.java:
##########
Review Comment:
Throwing an exception is actually safer than returning null since if we
return null it may cause unidentified null pointer exceptions. But we can add
additional check for dbclosed if currentEntry != null to avoid db closure case
between call of hasNext and next.
```
if (currentEntry != null) {
if (!isDbClosed()) {
rocksDBIterator.get().next();
return currentEntry;
}
}
```
--
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]