bookkeeper
bookkeeper copied to clipboard
[improve] Increase the cache prefetch success rate when entryId is discontinuous.
https://github.com/apache/bookkeeper/blob/b6607263910cf3850c510272c833675b852d9c6e/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java#L674
When Pulsar's persistence is configured with EnsembleSize != WriteQuorum, for example, EnsembleSize=2 and WriteQuorum=1, entry prefetching fails. If there is a backlog of messages, after the RocksDB index cache is evicted, the disk read rate becomes very slow, and entry prefetching fails because the entryId is validated, and at this point, the entryId is discontinuous.
Is it possible to read entries without validating the entryId?
use org.apache.bookkeeper.bookie.storage.EntryLogger#readEntry(long)