Skip to content
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

[improve][broker] PIP-192 Added LeastResourceUsageWithWeight broker assignment strategy to the load balancer extensions #18964

Merged
merged 1 commit into from
Dec 29, 2022

Conversation

heesung-sn
Copy link
Contributor

@heesung-sn heesung-sn commented Dec 17, 2022

Master Issue: #16691

Motivation

We will start raising PRs to implement PIP-192, #16691

Modifications

This PR Added LeastResourceUsageWithWeight to the load balancer extensions and its unit test.

For the pip-192 project, this LeastResourceUsageWithWeight

  • is a copy of the existing broker-bundle assignment strategy, org.apache.pulsar.broker.loadbalance.impl.LeastResourceUsageWithWeight.
  • uses the load data from the load balancer extensions.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • *Added unit tests for the new classes.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

We will have separate PRs to update the Doc later.

Matching PR in forked repository

PR in forked repository: heesung-sn#17

…ssignment strategy to the load balancer extensions
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 17, 2022
@heesung-sn heesung-sn changed the title [improve][broker] PIP-192 Added LeastResourceUsageWithWeight broker a… [improve][broker] PIP-192 Added LeastResourceUsageWithWeight broker assignment strategy to the load balancer extensions Dec 17, 2022
@Demogorgon314 Demogorgon314 self-requested a review December 20, 2022 14:04
Copy link
Contributor

@HQebupt HQebupt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2022

Codecov Report

Merging #18964 (bb752a3) into master (3011946) will decrease coverage by 1.45%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18964      +/-   ##
============================================
- Coverage     46.75%   45.29%   -1.46%     
- Complexity    10514    10899     +385     
============================================
  Files           703      772      +69     
  Lines         68858    74313    +5455     
  Branches       7383     7998     +615     
============================================
+ Hits          32193    33659    +1466     
- Misses        33065    36850    +3785     
- Partials       3600     3804     +204     
Flag Coverage Δ
unittests 45.29% <0.00%> (-1.46%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ensions/strategy/LeastResourceUsageWithWeight.java 0.00% <0.00%> (ø)
.../pulsar/broker/service/SharedConsumerAssignor.java 3.70% <0.00%> (-74.08%) ⬇️
...apache/pulsar/broker/service/EntryAndMetadata.java 0.00% <0.00%> (-40.75%) ⬇️
...ar/broker/loadbalance/impl/BundleSplitterTask.java 54.00% <0.00%> (-26.00%) ⬇️
.../apache/pulsar/broker/loadbalance/LoadManager.java 61.11% <0.00%> (-16.67%) ⬇️
.../apache/pulsar/broker/admin/impl/PackagesBase.java 54.12% <0.00%> (-13.77%) ⬇️
...che/pulsar/broker/intercept/BrokerInterceptor.java 0.00% <0.00%> (-13.05%) ⬇️
...tent/NonPersistentDispatcherMultipleConsumers.java 40.74% <0.00%> (-12.35%) ⬇️
...apache/pulsar/broker/service/TopicListService.java 40.80% <0.00%> (-12.00%) ⬇️
...e/pulsar/broker/service/EntryBatchIndexesAcks.java 82.14% <0.00%> (-10.72%) ⬇️
... and 159 more

@Demogorgon314 Demogorgon314 merged commit a8da549 into apache:master Dec 29, 2022
@heesung-sn heesung-sn deleted the pip-192-assignment-strategy branch April 2, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants