You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "syk-coder (via GitHub)" <gi...@apache.org> on 2023/04/27 07:05:46 UTC

[GitHub] [pulsar] syk-coder opened a new issue, #20194: [Bug] While Setting BookieAffinity group, not using the broker config to set the default number of bundles

syk-coder opened a new issue, #20194:
URL: https://github.com/apache/pulsar/issues/20194

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Version
   
   branch: master
   commitId: eedf7026ae60f39bcf74ce67728b47d966fe237f
   
   
   ### Minimal reproduce step
   
   Create a namespace under a tenant
   Set bookie-affinity group for the namespace
   
   
   ### What did you expect to see?
   
   Pulsar should read the number of bundles('defaultNumberOfNamespaceBundles') data from the broker config file and use that instead of using a single bundle while creating the affinity group.
   
   ### What did you see instead?
   
   Broker is calling the default bundle method in PoliciesUtil and setting the bundle size as 1
   
   **NamespacesBase.java**
   getLocalPolicies().setLocalPoliciesWithCreate(namespaceName, oldPolicies -> {
                   LocalPolicies localPolicies = oldPolicies.map(
                           policies -> new LocalPolicies(policies.bundles,
                                   bookieAffinityGroup,
                                   policies.namespaceAntiAffinityGroup))
                           .orElseGet(() -> new LocalPolicies(**defaultBundle()**,
                                   bookieAffinityGroup,
                                   null));
                   log.info("[{}] Successfully updated local-policies configuration: namespace={}, map={}", clientAppId(),
                           namespaceName, localPolicies);
   
   **PoliciesUtil.java**
   public static BundlesData defaultBundle() {
           List<String> boundaries = new ArrayList<>();
           boundaries.add(FIRST_BOUNDARY);
           boundaries.add(LAST_BOUNDARY);
           return BundlesData.builder()
                   .numBundles(1)
                   .boundaries(boundaries)
                   .build();
       }
   
   
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- closed issue #20194: [Bug] While Setting BookieAffinity group, not using the broker config to set the default number of bundles

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- closed issue #20194: [Bug] While Setting BookieAffinity group, not using the broker config to set the default number of bundles
URL: https://github.com/apache/pulsar/issues/20194


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- commented on issue #20194: [Bug] While Setting BookieAffinity group, not using the broker config to set the default number of bundles

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- commented on issue #20194:
URL: https://github.com/apache/pulsar/issues/20194#issuecomment-1534238475

   Hi @syk-coder , Do we have any updates?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org