commit | 7c42c9d54152e4886617ff6a9388f7e3a330d2d6 | [log] [tgz] |
---|---|---|
author | StevenLuMT <42990025+StevenLuMT@users.noreply.github.com> | Tue Jan 11 19:35:38 2022 +0800 |
committer | GitHub <noreply@github.com> | Tue Jan 11 19:35:38 2022 +0800 |
tree | e56ac5fbc8673770755f3ab5fcacf96138eb2871 | |
parent | ee2462ce30341583eb7f4471ca27c72771a1202f [diff] |
bug fix for EntryLocationIndex.getLastEntryInLedger (#2946) ### Motivation bug fix for EntryLocationIndex.getLastEntryInLedger when the ledger is deleted, then get last entry in this ledger, two case in method(name is EntryLocationIndex.getLastEntryInLedger) case return -1: 1) when the ledger is deleted,return -1 2) then the method(name is SingleDirectoryDbLedgerStorage.getLastEntry) should read entry's location index, but entryID's value is -1, the code will throw a unexcepted error( error information is "IOException: org.apache.bookkeeper.bookie.EntryLogger$EntryLookupException$MissingLogFileException: Missing entryLog 0 for ledgerId ***, entry -1 at offset 0", if you want to get more details,you can read the Issue: #2927 case throw NoEntryException: 1) when the ledger is deleted,throw NoEntryException like the method( name is **getLastEntryInLedgerInternal** ) solving ledgerId is not found 2) then the method(name is SingleDirectoryDbLedgerStorage.getLastEntry) just throw NoEntryException , don't need to read entry's location index and entry's log From what has been discussed above When ledger is deleted, it is more correct to return NoEntryException when get last entry ### Changes 1.if the ledger has been deleted,run default path for NoEntryException Master Issue: #2927
Apache BookKeeper is a scalable, fault tolerant and low latency storage service optimized for append-only workloads.
It is suitable for being used in following scenarios:
Please visit the Documentation from the project website for more information.
For filing bugs, suggesting improvements, or requesting new features, help us out by opening a Github issue or opening an Apache jira.
Subscribe or mail the user@bookkeeper.apache.org list - Ask questions, find answers, and also help other users.
Subscribe or mail the dev@bookkeeper.apache.org list - Join development discussions, propose new ideas and connect with contributors.
Join us on Slack - This is the most immediate way to connect with Apache BookKeeper committers and contributors.
We feel that a welcoming open community is important and welcome contributions.
See Developer Setup to get your local environment setup.
Take a look at our open issues: JIRA Issues Github Issues.
Review our coding style and follow our pull requests to learn about our conventions.
Make your changes according to our contribution guide.