You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/19 09:38:27 UTC

[GitHub] [pulsar] Nicklee007 opened a new pull request, #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

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

   Fixes #13973
   
   ### Motivation
   clean inactive bundle from bundleData in loadData and bundlesCache after the bundle be split or unload
   
   ### Modifications
   when every broker operate updateBundleData , then remove the inactive bundel from bundleData in loadData,and clean the bundlesCache release the bundle-data znode in path '/loadbalance/bundle-data' as the leader broker;
   
   ### Documentation
   
   Need to update docs? 
     
   - [x] `no-need-doc` 
     


-- 
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] Nicklee007 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
Nicklee007 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1120105521

   /pulsarbot run-failure-checks


-- 
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] github-actions[bot] commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1104018821

   @Nicklee007:Thanks for providing doc info!


-- 
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] Nicklee007 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
Nicklee007 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1103997355

   /pulsarbot run-failure-checks


-- 
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] gaozhangmin closed pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
gaozhangmin closed pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache
URL: https://github.com/apache/pulsar/pull/13974


-- 
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] hangc0276 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1111145858

   @Nicklee007  I just left one little comment, please address the comment and resolve the conflicts. Thanks a lot.


-- 
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] gaozhangmin merged pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
gaozhangmin merged PR #13974:
URL: https://github.com/apache/pulsar/pull/13974


-- 
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] Nicklee007 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
Nicklee007 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1119565624

   /pulsarbot run-failure-checks


-- 
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] 315157973 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
315157973 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1111077029

   Please resolve the conflicts


-- 
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] github-actions[bot] commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1099788282

   The pr had no activity for 30 days, mark with Stale label.


-- 
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] Nicklee007 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
Nicklee007 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1120112856

   /pulsarbot rerun-failure-checks


-- 
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] gaozhangmin commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1102393513

   /pulsarbot run-failure-checks


-- 
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] hangc0276 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1102476626

   @Nicklee007 Thanks for you contribution. Please help address the compilation issue.
   ```
   COMPILATION ERROR : 
   Error:  /home/runner/work/pulsar/pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java:[69[8](https://github.com/apache/pulsar/runs/6075571934?check_suite_focus=true#step:9:8),37] method splitAndOwnBundle in class org.apache.pulsar.broker.namespace.NamespaceService cannot be applied to given types;
     required: org.apache.pulsar.common.naming.NamespaceBundle,boolean,org.apache.pulsar.common.naming.NamespaceBundleSplitAlgorithm,java.util.List<java.lang.Long>
     found: org.apache.pulsar.common.naming.NamespaceBundle,boolean,org.apache.pulsar.common.naming.NamespaceBundleSplitAlgorithm
     reason: actual and formal argument lists differ in length
   ```


-- 
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] Nicklee007 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
Nicklee007 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1119807389

   /pulsarbot run-failure-checks


-- 
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] hangc0276 commented on a diff in pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on code in PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#discussion_r859943028


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java:
##########
@@ -43,31 +43,33 @@
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
 
+import lombok.Cleanup;
 import org.apache.bookkeeper.mledger.ManagedLedger;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.pulsar.broker.BundleData;
+import org.apache.pulsar.broker.loadbalance.LoadData;
 import org.apache.pulsar.broker.loadbalance.LoadManager;
+import org.apache.pulsar.broker.loadbalance.ResourceUnit;
 import org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl;
 import org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerWrapper;
+import org.apache.pulsar.broker.loadbalance.impl.SimpleResourceUnit;
 import org.apache.pulsar.broker.lookup.LookupResult;
 import org.apache.pulsar.broker.service.BrokerTestBase;
 import org.apache.pulsar.broker.service.Topic;
 import org.apache.pulsar.broker.service.persistent.PersistentTopic;
 import org.apache.pulsar.client.api.Consumer;
-import org.apache.pulsar.common.naming.NamespaceBundle;
-import org.apache.pulsar.common.naming.NamespaceBundleFactory;
-import org.apache.pulsar.common.naming.NamespaceBundleSplitAlgorithm;
-import org.apache.pulsar.common.naming.NamespaceBundles;
-import org.apache.pulsar.common.naming.NamespaceName;
-import org.apache.pulsar.common.naming.TopicName;
+import org.apache.pulsar.client.api.PulsarClient;
+import org.apache.pulsar.common.naming.*;

Review Comment:
   Please avoid using import *



-- 
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] github-actions[bot] commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1104018583

   @Nicklee007:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


-- 
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] Nicklee007 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
Nicklee007 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1104048938

   > @Nicklee007 Thanks for you contribution. Please help address the compilation issue.
   > 
   > ```
   > COMPILATION ERROR : 
   > Error:  /home/runner/work/pulsar/pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java:[69[8](https://github.com/apache/pulsar/runs/6075571934?check_suite_focus=true#step:9:8),37] method splitAndOwnBundle in class org.apache.pulsar.broker.namespace.NamespaceService cannot be applied to given types;
   >   required: org.apache.pulsar.common.naming.NamespaceBundle,boolean,org.apache.pulsar.common.naming.NamespaceBundleSplitAlgorithm,java.util.List<java.lang.Long>
   >   found: org.apache.pulsar.common.naming.NamespaceBundle,boolean,org.apache.pulsar.common.naming.NamespaceBundleSplitAlgorithm
   >   reason: actual and formal argument lists differ in length
   > ```
   
   @hangc0276 after the last commit method splitAndOwnBundle's argument lists has changed, the unit test has been adapted it in the new commit. PTAL Thx.
   


-- 
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] Nicklee007 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
Nicklee007 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1120112628

   > @Nicklee007 I just left one little comment, please address the comment and resolve the conflicts. Thanks a lot.
   
   @hangc0276 Has resolve the conflicts and update the import list, PTAL Thx.


-- 
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] Nicklee007 commented on pull request #13974: [broker] clean inactive bundle from bundleData in loadData and bundlesCache

Posted by GitBox <gi...@apache.org>.
Nicklee007 commented on PR #13974:
URL: https://github.com/apache/pulsar/pull/13974#issuecomment-1119795186

   /pulsarbot run-failure-checks


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