[bookie-shell] fix readLedger with parameter -bookie and -ledgerid can not read any entries in ledger
Motivation
If we use bookieshell readLedger only with parameter -ledgerid, we can read all entries in this ledger, but if use with parameter -ledgerid and --bookie, we cant read any entries.
This is because it try to reverse entries from firstentry(default 0) to lastEntry(default -1). Therefore it would directly finish without read any entries, misleading us that ledgerId in our selected bookie has no entry.
Changes
when set -ledgerid and -bookie and not set -entry, continue to read next entry until get BKNoSuchEntryException
@TakaHiR07 Are you still working on this?
@TakaHiR07 Are you still working on this?
Sorry for forget this work. If needing, I can finish this in a few day.
@TakaHiR07 Thanks for your contribution, I want to move this forward in the next release.
Can we add some tests?
@shoothzj @horizonzy Have done. Can you help review again. Thx