pkumar-singh commented on a change in pull request #2946:
URL: https://github.com/apache/bookkeeper/pull/2946#discussion_r774774180
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndex.java
##########
@@ -93,9 +93,16 @@ public long getLocation(long ledgerId, long entryId) throws
IOException {
public long getLastEntryInLedger(long ledgerId) throws IOException {
if (deletedLedgers.contains(ledgerId)) {
// Ledger already deleted
- return -1;
+ if (log.isDebugEnabled()) {
Review comment:
I think you are changing the semantics of this method.
As far as I could see.
Last Entry ID -1 means ledger is deleted.
```
for (entryId = firstEntryId; entryId < lastEntryId; entryId++) {
// do somehting.
}
```
Since Last Entry ID is -1 it will not go in the for loop. Throwing
Bookie.NoEntryException might have undesirable effect in this case.
However, Bookie.NoEntryException is thrown when EntryID is valid but entry
does not exist.
--
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]