apache / apache/bookkeeper

[improve] Increase the cache prefetch success rate when entryId is discontinuous.

Open
#4,539 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.