You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Demogorgon314 (via GitHub)" <gi...@apache.org> on 2023/04/03 08:04:15 UTC

[GitHub] [pulsar] Demogorgon314 opened a new pull request, #19999: [improve][broker] PIP-192: Update the lookup data path to support deploy and rollback

Demogorgon314 opened a new pull request, #19999:
URL: https://github.com/apache/pulsar/pull/19999

   PIP: https://github.com/apache/pulsar/issues/16691
   
   ### Motivation
   
   If we deploy the new LB or rollback to the old LB. We need to isolate broker-bundle assignments to those brokers that configure the matching LM.
   
   ### Modifications
   * Use a new zk path to store the available broker use by the new load manager.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   


-- 
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] heesung-sn commented on a diff in pull request #19999: [improve][broker] PIP-192: Update the lookup data path to support deploy and rollback

Posted by "heesung-sn (via GitHub)" <gi...@apache.org>.
heesung-sn commented on code in PR #19999:
URL: https://github.com/apache/pulsar/pull/19999#discussion_r1157505252


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImplTest.java:
##########
@@ -513,6 +515,35 @@ public Map<String, BrokerLookupData> filter(Map<String, BrokerLookupData> broker
         assertEquals(brokerLookupData.get().getWebServiceUrl(), pulsar2.getWebServiceAddress());
     }
 
+    @Test
+    public void testStartOldLoadManager() throws Exception {
+        ServiceConfiguration defaultConf = getDefaultConf();
+        defaultConf.setAllowAutoTopicCreation(true);
+        defaultConf.setForceDeleteNamespaceAllowed(true);
+        defaultConf.setLoadManagerClassName(ModularLoadManagerImpl.class.getName());
+        defaultConf.setLoadBalancerSheddingEnabled(false);
+        try (var additionalPulsarTestContext = createAdditionalPulsarTestContext(defaultConf)) {
+            // start pulsar3 with old load manager
+            var pulsar3 = additionalPulsarTestContext.getPulsarService();
+
+            var availableBrokers = pulsar3.getLoadManager().get().getAvailableBrokers();
+            assertEquals(availableBrokers.size(), 1);
+            assertEquals(availableBrokers.iterator().next(), pulsar3.getLookupServiceAddress());
+            assertNotEquals(availableBrokers.iterator().next(), pulsar1.getLookupServiceAddress());
+            assertNotEquals(availableBrokers.iterator().next(), pulsar2.getLookupServiceAddress());

Review Comment:
   nit: probably these asserts are not required? should we remove them?



-- 
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] Demogorgon314 commented on a diff in pull request #19999: [improve][broker] PIP-192: Update the lookup data path to support deploy and rollback

Posted by "Demogorgon314 (via GitHub)" <gi...@apache.org>.
Demogorgon314 commented on code in PR #19999:
URL: https://github.com/apache/pulsar/pull/19999#discussion_r1158175085


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImplTest.java:
##########
@@ -513,6 +515,35 @@ public Map<String, BrokerLookupData> filter(Map<String, BrokerLookupData> broker
         assertEquals(brokerLookupData.get().getWebServiceUrl(), pulsar2.getWebServiceAddress());
     }
 
+    @Test
+    public void testStartOldLoadManager() throws Exception {
+        ServiceConfiguration defaultConf = getDefaultConf();
+        defaultConf.setAllowAutoTopicCreation(true);
+        defaultConf.setForceDeleteNamespaceAllowed(true);
+        defaultConf.setLoadManagerClassName(ModularLoadManagerImpl.class.getName());
+        defaultConf.setLoadBalancerSheddingEnabled(false);
+        try (var additionalPulsarTestContext = createAdditionalPulsarTestContext(defaultConf)) {
+            // start pulsar3 with old load manager
+            var pulsar3 = additionalPulsarTestContext.getPulsarService();
+
+            var availableBrokers = pulsar3.getLoadManager().get().getAvailableBrokers();
+            assertEquals(availableBrokers.size(), 1);
+            assertEquals(availableBrokers.iterator().next(), pulsar3.getLookupServiceAddress());
+            assertNotEquals(availableBrokers.iterator().next(), pulsar1.getLookupServiceAddress());
+            assertNotEquals(availableBrokers.iterator().next(), pulsar2.getLookupServiceAddress());

Review Comment:
   Updated.



-- 
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- merged pull request #19999: [improve][broker] PIP-192: Update the lookup data path to support deploy and rollback

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- merged PR #19999:
URL: https://github.com/apache/pulsar/pull/19999


-- 
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- closed pull request #19999: [improve][broker] PIP-192: Update the lookup data path to support deploy and rollback

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- closed pull request #19999: [improve][broker] PIP-192: Update the lookup data path to support deploy and rollback
URL: https://github.com/apache/pulsar/pull/19999


-- 
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