-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] fix the autoRecovery aware of the right rack info. #19382
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
Conversation
cafe0fd to
266de03
Compare
9993ba3 to
a49b545
Compare
...r-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java
Outdated
Show resolved
Hide resolved
horizonzy
left a comment
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.
I recommend setting rack info in the bk zookeeper cluster.
Of course, it would be best to migrate the Metadata BookieRackAffinityMapping strategy to the bookkeeper project so that bookkeeper-only businesses can have this capability as well. |
|
cc @hangc0276 |
| String metadataServiceUri = ConfigurationStringUtil.castToString(conf.getProperty("metadataServiceUri")); | ||
| if (StringUtils.isNotBlank(metadataServiceUri)) { | ||
| // First get from the Pulsar broker side | ||
| String metadataStoreUrl = ConfigurationStringUtil.castToString(conf.getProperty("metadataStoreUrl")); |
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.
This logic is used for bk auto-recovery, and it doesn't make sense to get it from the Pulsar broker side. If we use it with this logic, we need to configure metadataStoreUrl in the conf/bookkeeper.conf
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.
The current BookieRackAffinityMapping policy is implemented on the pulsar side and its configuration is configured to the pulsar's zk (metadatastore).
It would be best to migrate the Metadata BookieRackAffinityMapping strategy to the bookkeeper project so that bookkeeper-only businesses can have this capability as well.
|
The pr had no activity for 30 days, mark with Stale label. |
Fixes #18834 #18672
Motivation
When run the separate meta store between the Pulsar broker cluster and the Bookkeeper cluster, the
metadataStoreUrl(broker .conf) different from themetadataServiceUri(bookkeeper.conf), the auto recovery (standlone) cannot get the right rack info because when we set the rack info byadmin bookies set-bookie-rack, the rack info on the broker side, so we should get the rack info from the pulsar broker side, not the bookkeeper side.Modifications
First get from the broker side,then downgrade to the old logic(bk side )
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: yangl#19