New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to configure BookKeeper Opportunistic Striping Feature (and all BK client features using bookkeeper_ prefix) #9232
Conversation
6122c88
to
2896026
Compare
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
Outdated
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
@sijie I have updated the patch according to your suggestion PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
conf/broker.conf
Outdated
@@ -800,6 +800,13 @@ managedLedgerDefaultWriteQuorum=2 | |||
# Number of guaranteed copies (acks to wait before write is complete) | |||
managedLedgerDefaultAckQuorum=2 | |||
|
|||
# with OpportunisticStriping=true the ensembleSize is adapted automatically to writeQuorum | |||
# in case of lack of enough bookies | |||
#bookkeeper.opportunisticStriping=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid using "."? Currently, we use system environment variables for loading and applying config in Kubernetes. Using "." will make things become challenging. Can we use bookkeeper_
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good idea @sijie .
I have updated the patch
/pulsarbot run-failure-checks |
@sijie can you please take another look ? |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
… BK client features using bookkeeper_ prefix) (#9232) BookKeeper 4.12 introduces the 'Opportunistic Striping' feature. In BK terms 'striping' happens when EnsembleSize is greater than WriteQuorumSize, in this mode the entries are distributed round robin over a set of bookies, in order to achieve better performances as you can use the resources of more bookies. For instance in a small HA cluster, with only 3 bookies, you must run Pulsar with 2-2-2 replication parameters (EnsembleSize=2,WriteQuorumSize=2,AckQuorumSize=2). You cannot set EnsembleSize=3 (and thus use 'striping') because in case of temporary outage of a single bookie the BK client is not able to create an ensemble with 3 bookies. With Opportunistic Striping you can use 3-2-2 and when the system is fully up-and-running with 3 bookies then you go with striping, but during single bookie outages (like during reconfigurations/updates) you fall back to 2-2-2. This is not about consistency or durability, it is only about having the ability to get the most out of your bookkeeper cluster. - Add a generic way to configure internal BookKeeper client options, any entry start starts with `bookkeeper_` is passed to the BK client configuration after stripping the prefix - Add unit tests for `bookkeeper_opportunisticStriping` configuration option - Add configuration example in broker.conf - the change add new tests (cherry picked from commit bc69ad2)
@eolivelli Actually this feature is added from bookkeeper 4.13.0. We are still using 4.12.0 in 2.7.x. This PR can not cherry-pick to branch-2.7. Could you please revert these changes? |
…(and all BK client features using bookkeeper_ prefix) (apache#9232)" This reverts commit baddf9d.
Let me fix it ASAP. I will send a PR that cleans up the branch with a partial revert |
…(and all BK client features using bookkeeper_ prefix) (apache#9232)" This reverts commit baddf9d.
…(and all BK client features using bookkeeper_ prefix) (apache#9232)" This reverts commit baddf9d.
Motivation
BookKeeper 4.12 introduces the 'Opportunistic Striping' feature.
In BK terms 'striping' happens when EnsembleSize is greater than WriteQuorumSize, in this mode the entries are distributed round robin over a set of bookies, in order to achieve better performances as you can use the resources of more bookies.
For instance in a small HA cluster, with only 3 bookies, you must run Pulsar with 2-2-2 replication parameters (EnsembleSize=2,WriteQuorumSize=2,AckQuorumSize=2).
You cannot set EnsembleSize=3 (and thus use 'striping') because in case of temporary outage of a single bookie the BK client is not able to create an ensemble with 3 bookies.
With Opportunistic Striping you can use 3-2-2 and when the system is fully up-and-running with 3 bookies then you go with striping, but during single bookie outages (like during reconfigurations/updates) you fall back to 2-2-2.
This is not about consistency or durability, it is only about having the ability to get the most out of your bookkeeper cluster.
Modifications
bookkeeper_
is passed to the BK client configuration after stripping the prefixbookkeeper_opportunisticStriping
configuration optionVerifying this change
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDependencies: no
The public API: no
The schema: no
The default values of configurations: no
The wire protocol: no
The rest endpoints: no
The admin cli options: no
Anything that affects deployment: no
Documentation
Does this pull request introduce a new feature? yes
If yes, how is the feature documented? JavaDocs and default configuration files