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 setReplicatedSubscriptionStatus incorrect behavior #21510

Conversation

liudezhi2098
Copy link
Contributor

Fixes #21506

Motivation

fix setReplicatedSubscriptionStatus Incorrect behavior, when unenable enableReplicatedSubscriptions.

Modifications

when unenable enableReplicatedSubscriptions, set replicatedSubscription status to ture, should throw an exception.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 3, 2023
@liudezhi2098 liudezhi2098 self-assigned this Nov 3, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #21510 (9aa10ca) into master (78fc853) will increase coverage by 39.84%.
Report is 19 commits behind head on master.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #21510       +/-   ##
=============================================
+ Coverage     33.39%   73.23%   +39.84%     
- Complexity    12194    32664    +20470     
=============================================
  Files          1638     1892      +254     
  Lines        127949   140694    +12745     
  Branches      13952    15476     +1524     
=============================================
+ Hits          42733   103043    +60310     
+ Misses        79564    29550    -50014     
- Partials       5652     8101     +2449     
Flag Coverage Δ
inttests 24.11% <0.00%> (-0.05%) ⬇️
systests 24.67% <0.00%> (?)
unittests 72.53% <100.00%> (+40.71%) ⬆️

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

Files Coverage Δ
...ker/service/persistent/PersistentSubscription.java 76.35% <100.00%> (+27.12%) ⬆️

... and 1541 files with indirect coverage changes

@@ -178,6 +186,21 @@ protected void setup() throws Exception {
urlTls3 = new URL(pulsar3.getWebServiceAddressTls());
admin3 = PulsarAdmin.builder().serviceHttpUrl(url3.toString()).build();

// Start region 4
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Start region 4
// Start region 4, the Broker of cluster-4 will disable the feature "ReplicatedSubscriptions"

@Technoboy- Technoboy- merged commit b949187 into apache:master Nov 12, 2023
68 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment