tisonkun commented on code in PR #16492:
URL: https://github.com/apache/pulsar/pull/16492#discussion_r921307348
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2839,15 +2849,8 @@ public String getBookkeeperMetadataStoreUrl() {
} else {
// Fallback to same metadata service used by broker, adding the
"metadata-store" to specify the BK
// metadata adapter
- String suffix;
- if (StringUtils.isNotBlank(metadataStoreUrl)) {
- suffix = metadataStoreUrl;
- } else {
- // Fallback to old setting
- // Note: chroot is not settable by using 'zookeeperServers'
config.
- suffix = ZKMetadataStore.ZK_SCHEME_IDENTIFIER +
zookeeperServers;
- }
- return "metadata-store:" + suffix +
BookKeeperConstants.DEFAULT_ZK_LEDGERS_ROOT_PATH;
+ // Note: chroot is not settable by using 'zookeeperServers' config.
+ return "metadata-store:" + getMetadataStoreUrl() +
BookKeeperConstants.DEFAULT_ZK_LEDGERS_ROOT_PATH;
Review Comment:
The configuration will resolve empty scheme as ZK. Once we decide to break
backward compatibility, we should remove all usage of `zookeeperServers` and
this fallback logic will be remove also. Thus, I don't think we should explicit
specify the identifier, or we should explicit add it in `getMetadataStoreUrl`
instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]