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

[fix] [broker] fix replicated namespaces filter in filterAndUnloadMatchedNamespaceAsync #23100

Merged
merged 15 commits into from
Jul 31, 2024

Conversation

iosdev747
Copy link
Contributor

@iosdev747 iosdev747 commented Jul 30, 2024

Main Issue: #23092

Motivation

Problem is namespace unload operation happens on all the namespaces that matches the policy regex. Check should be done only on namespaces in current cluster.

Modifications

Fix namespace filter so only namespaces in current cluster should be used for unload operation.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Multi cluster setup where namespace is not present in one cluster but is there in other.

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
  • The metrics
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository: iosdev747#2

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM. The concurrency limiting solution will be needed to prevent issues for clusters with a lot of tenants and namespaces.

@lhotari
Copy link
Member

lhotari commented Jul 30, 2024

A test case would be needed. optimally a test that reproduces the original issue so that we can see that the changes fix it.

@lhotari
Copy link
Member

lhotari commented Jul 30, 2024

thanks for the contribution @iosdev747 , great work!

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Project coverage is 73.45%. Comparing base (bbc6224) to head (13bf97a).
Report is 541 commits behind head on master.

Files Patch % Lines
.../apache/pulsar/broker/admin/impl/ClustersBase.java 94.44% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23100      +/-   ##
============================================
- Coverage     73.57%   73.45%   -0.13%     
- Complexity    32624    33540     +916     
============================================
  Files          1877     1919      +42     
  Lines        139502   144107    +4605     
  Branches      15299    15747     +448     
============================================
+ Hits         102638   105851    +3213     
- Misses        28908    30152    +1244     
- Partials       7956     8104     +148     
Flag Coverage Δ
inttests 27.59% <0.00%> (+3.00%) ⬆️
systests 24.74% <0.00%> (+0.41%) ⬆️
unittests 72.53% <94.44%> (-0.32%) ⬇️

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

Files Coverage Δ
.../apache/pulsar/broker/admin/impl/ClustersBase.java 80.96% <94.44%> (+0.46%) ⬆️

... and 516 files with indirect coverage changes

@lhotari lhotari added this to the 3.4.0 milestone Jul 30, 2024
@lhotari lhotari merged commit 5aa5e7d into apache:master Jul 31, 2024
52 of 53 checks passed
Technoboy- pushed a commit that referenced this pull request Aug 1, 2024
lhotari pushed a commit that referenced this pull request Aug 6, 2024
…chedNamespaceAsync (#23100)

Co-authored-by: Lari Hotari <[email protected]>
(cherry picked from commit 5aa5e7d)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 8, 2024
…chedNamespaceAsync (apache#23100)

Co-authored-by: Lari Hotari <[email protected]>
(cherry picked from commit 6c01bb0)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 12, 2024
…chedNamespaceAsync (apache#23100)

Co-authored-by: Lari Hotari <[email protected]>
(cherry picked from commit 6c01bb0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants