-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] Duplicate LedgerOffloader creation when namespace/topic… #21591
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… policy is updated.
shibd
added
type/bug
The PR fixed a bug or issue reported a bug
ready-to-test
release/2.11.3
release/2.10.6
release/3.1.2
release/3.0.3
labels
Nov 17, 2023
poorbarcode
approved these changes
Nov 19, 2023
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/OffloadPoliciesImpl.java
Show resolved
Hide resolved
Technoboy-
reviewed
Nov 20, 2023
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/OffloadPoliciesImpl.java
Show resolved
Hide resolved
shibd
commented
Nov 20, 2023
pulsar-common/src/test/java/org/apache/pulsar/common/policies/data/OffloadPoliciesTest.java
Show resolved
Hide resolved
Technoboy-
approved these changes
Nov 20, 2023
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #21591 +/- ##
============================================
- Coverage 73.35% 73.27% -0.09%
+ Complexity 32711 32685 -26
============================================
Files 1892 1892
Lines 140707 140663 -44
Branches 15483 15484 +1
============================================
- Hits 103211 103066 -145
- Misses 29394 29493 +99
- Partials 8102 8104 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
coderzc
pushed a commit
to coderzc/pulsar
that referenced
this pull request
Nov 21, 2023
apache#21591) (cherry picked from commit 98bf9dd)
shibd
added a commit
to shibd/pulsar
that referenced
this pull request
Nov 22, 2023
apache#21591) (cherry picked from commit 98bf9dd)
4 tasks
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 20, 2023
apache#21591) (cherry picked from commit 98bf9dd)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 20, 2023
apache#21591) (cherry picked from commit 98bf9dd)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-2.10
cherry-picked/branch-2.11
cherry-picked/branch-3.0
cherry-picked/branch-3.1
doc-not-needed
Your PR changes do not impact docs
ready-to-test
release/2.10.6
release/2.11.3
release/3.0.3
release/3.1.2
type/bug
The PR fixed a bug or issue reported a bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
#21590
When namespace/topic policies are updated, will call this method to try to apply new policies of offload.
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
Lines 1373 to 1392 in eebd821
But, in this case(#21590), Never hit 1380 lines.
offloader.getOffloadPolicies()
andoffloadPolicies
are always unequal.Reason:
fileSystemProfilePath
.offloader.getOffloadPolicies()
result not be includedfileSystemProfilePath
offloadPolicies
is built from the broker configuration, which contains this configuration.Note:
In v3.1 after. This pr: #20804 introduces a
managedLedgerExtraConfigurations
variable, which is also always unequal if the user does not set the value. (null
vsempty map
)So after v3.1, In this case(#21590), this issue will appear regardless of whether you have
fileSystemProfilePath
set.Modifications
toProperties
method: Regardless of the user's configuration, we should all convert.toProperties
andcreate(Properties properties)
methods should be complementary.managedLedgerExtraConfigurations
conversion issue.Verifying this change
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository