commit | 96fc2e2aac4d026fe336ae8347521d9910165dd5 | [log] [tgz] |
---|---|---|
author | Sijie Guo <guosijie@gmail.com> | Thu Jun 20 20:19:53 2019 -0700 |
committer | GitHub <noreply@github.com> | Thu Jun 20 20:19:53 2019 -0700 |
tree | f367641f181f05a4863ee5791dfd78bf53e1d6e9 | |
parent | 533dd5d6e9d3ac9b24d2462f6ae4d4240a4bffdf [diff] |
Issue #1970: Ensure getStickyReadBookieIndex returns valid bookie index Descriptions of the changes in this PR: Master Issue: #1970 Related Issues: apache/pulsar#3715 apache/pulsar#4526 *Motivation* Fixes #1970 By default bookie uses a random generator to generate a bookie index as the sticky read bookie index. However the random generator will generate negative numbers. Hence it will generate negative bookie indexes in write set and cause ArrayIndexOutOfBoundException when bookkeeper attempts to read entries. *Modifications* Make sure getStickyReadBookieIndex not return negative number. *Verify this change* This problem introduced by a random generator. It is very hard to write a unit test to reproduce this issue. Existing StickyRead tests are good to cover this code change. Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Jia Zhai <zhaijia@apache.org>, Yong Zhang <zhangyong1025.zy@gmail.com> This closes #2111 from sijie/fix_sticky_read, closes #1970
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:
You can also read Turning Ledgers into Logs to learn how to turn ledgers into continuous log streams. If you are looking for a high level log stream API, you can checkout DistributedLog.
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.