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 configurationMetadataSyncEventTopic is marked supporting dynamic setting, but not implemented #22684

Merged
merged 9 commits into from
May 10, 2024

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented May 9, 2024

Motivation

The config configurationMetadataSyncEventTopic was introduced with PIP-136: Sync Pulsar policies across multiple clouds, which was released with 2.11.

This config was marked supporting dynamic setting, but has not been implemented.

Screenshot 2024-05-09 at 15 58 21

Modifications

Add the implementation for dynamic setting configurationMetadataSyncEventTopic

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode requested a review from lhotari May 9, 2024 08:46
@poorbarcode poorbarcode requested a review from lhotari May 9, 2024 10:41
@poorbarcode poorbarcode requested a review from lhotari May 9, 2024 10:54
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

@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 54.05405% with 85 lines in your changes are missing coverage. Please review.

Project coverage is 73.14%. Comparing base (bbc6224) to head (fb240fc).
Report is 252 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22684      +/-   ##
============================================
- Coverage     73.57%   73.14%   -0.43%     
+ Complexity    32624    32502     -122     
============================================
  Files          1877     1888      +11     
  Lines        139502   141237    +1735     
  Branches      15299    15504     +205     
============================================
+ Hits         102638   103308     +670     
- Misses        28908    29937    +1029     
- Partials       7956     7992      +36     
Flag Coverage Δ
inttests 27.37% <4.32%> (+2.79%) ⬆️
systests 24.64% <2.16%> (+0.32%) ⬆️
unittests 72.14% <54.05%> (-0.70%) ⬇️

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

Files Coverage Δ
...rg/apache/pulsar/broker/service/BrokerService.java 81.67% <100.00%> (+0.89%) ⬆️
...pulsar/metadata/impl/LocalMemoryMetadataStore.java 88.07% <100.00%> (+0.22%) ⬆️
...che/pulsar/metadata/impl/RocksdbMetadataStore.java 73.12% <100.00%> (+0.18%) ⬆️
...ta/impl/batching/AbstractBatchedMetadataStore.java 96.15% <100.00%> (+0.10%) ⬆️
...e/pulsar/metadata/impl/oxia/OxiaMetadataStore.java 90.51% <100.00%> (+0.51%) ⬆️
...r/metadata/api/extended/MetadataStoreExtended.java 25.00% <0.00%> (-8.34%) ⬇️
...n/java/org/apache/pulsar/broker/PulsarService.java 82.62% <60.46%> (+0.25%) ⬆️
...roker/service/PulsarMetadataEventSynchronizer.java 45.29% <45.52%> (+45.29%) ⬆️

... and 332 files with indirect coverage changes

@codelipenghui codelipenghui merged commit ff4853e into apache:master May 10, 2024
50 checks passed
@poorbarcode poorbarcode deleted the fix/dynamic_Synchronizer branch May 10, 2024 02:15
poorbarcode added a commit that referenced this pull request May 10, 2024
…orting dynamic setting, but not implemented (#22684)

(cherry picked from commit ff4853e)
poorbarcode added a commit that referenced this pull request May 10, 2024
…orting dynamic setting, but not implemented (#22684)

(cherry picked from commit ff4853e)
log.info("successfully created consumer {}", topicName);
} else {
State stateTransient = state;
log.info("[{}] Closing the new consumer because the synchronizer state is {}", stateTransient);
Copy link
Member

Choose a reason for hiding this comment

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

Fewer arguments provided (1) than placeholders specified (2)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it in the next PR : #22695

CompletableFuture closeConsumer = new CompletableFuture<>();
closeResource(() -> consumer.closeAsync(), closeConsumer);
closeConsumer.thenRun(() -> {
log.info("[{}] Closed the new consumer because the synchronizer state is {}", stateTransient);
Copy link
Member

Choose a reason for hiding this comment

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

Same as previous.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it in the next PR : #22695

Comment on lines +224 to +225
CompletableFuture closeConsumer = new CompletableFuture<>();
closeResource(() -> consumer.closeAsync(), closeConsumer);
Copy link
Member

Choose a reason for hiding this comment

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

                CompletableFuture<Void> closeConsumer = new CompletableFuture<>();
                closeResource(consumer::closeAsync, closeConsumer);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Improved the code in the next PR: #22695

nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request May 13, 2024
…orting dynamic setting, but not implemented (apache#22684)

(cherry picked from commit ff4853e)
(cherry picked from commit 03da743)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request May 16, 2024
…orting dynamic setting, but not implemented (apache#22684)

(cherry picked from commit ff4853e)
(cherry picked from commit 03da743)
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.

7 participants