commit | dc2bb1dfed38d7f9ad7a29fc92bd907e51af5b21 | [log] [tgz] |
---|---|---|
author | Hang Chen <chenhang@apache.org> | Thu Feb 01 14:49:07 2024 +0800 |
committer | GitHub <noreply@github.com> | Thu Feb 01 14:49:07 2024 +0800 |
tree | 4c3ca4738ad38d706a6ec815871987ff75bebc35 | |
parent | 1eceb5dd2180ab57e5b21be968206292bb825177 [diff] |
Enable reorder read sequence for bk client by default (#4139) ### Motivation <!-- Explain here the context, and why you're making that change. What is the problem you're trying to solve. --> If one ledger's ensemble is [bk0, bk1] and bk0 is down, the bookie client may send a read request to bk0 first then fail with the following errors, and resend the read request to bk1 in the end. ``` 2023-10-19T18:33:52,042 - ERROR - [BookKeeperClientWorker-OrderedExecutor-3-0:PerChannelBookieClient@563] - Cannot connect to 192.168.31.216:3181 as endpoint resolution failed (probably bookie is down) err org.apache.bookkeeper.proto.BookieAddressResolver$BookieIdNotResolvedException: Cannot resolve bookieId 192.168.31.216:3181, bookie does not exist or it is not running 2023-10-19T18:33:52,042 - INFO - [BookKeeperClientWorker-OrderedExecutor-3-0:DefaultBookieAddressResolver@77] - Cannot resolve 192.168.31.216:3181, bookie is unknown org.apache.bookkeeper.client.BKException$BKBookieHandleNotAvailableException: Bookie handle is not available 2023-10-19T18:33:52,042 - INFO - [BookKeeperClientWorker-OrderedExecutor-3-0:PendingReadOp$LedgerEntryRequest@223] - Error: Bookie handle is not available while reading L6 E40 from bookie: 192.168.31.216:3181 ``` One of the related issues is in the auto-recovery decommission and there is one PR in the BookKeeper repo: https://github.com/apache/bookkeeper/pull/4113 However, the bookie client already knows the bk0 is down and we should send the read request to bk1 first. So we can reorder the read request based on the known bookie list. If one bookie is lost, it will reorder the lost bookie to the end of the read list. ### Modifications <!-- Describe the modifications you've done. --> Enable the `reorderReadSequence` by default for auto-recovery.
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.
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 our installation guide to get your local environment setup.
Take a look at our open issues: GitHub Issues.
Review our coding style and follow our pull requests to learn more about our conventions.
Make your changes according to our contributing guide