Repository navigation
[fix][admin] Fix NPE when get OffloadThreshold on namespace. - #18061
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18061 +/- ##
=============================================
+ Coverage 34.91% 46.80% +11.88%
- Complexity 5707 17880 +12173
=============================================
Files 607 1574 +967
Lines 53396 128311 +74915
Branches 5712 14113 +8401
=============================================
+ Hits 18644 60054 +41410
- Misses 32119 62085 +29966
- Partials 2633 6172 +3539
Flags with carried forward coverage won't be shown. Click here to find out more.
|
poorbarcode
approved these changes
Oct 17, 2022
mattisonchao
approved these changes
Oct 17, 2022
| .thenAccept(policies -> { | ||
| if (policies.offload_policies == null) { | ||
| if (policies.offload_policies == null | ||
| || policies.offload_policies.getManagedLedgerOffloadThresholdInBytes() == null) { |
Member
There was a problem hiding this comment.
It's weird why the DEFAULT_OFFLOAD_THRESHOLD_IN_BYTES is null. But I think it's better to use this constant.
codelipenghui
approved these changes
Oct 17, 2022
Technoboy-
added a commit
that referenced
this pull request
Oct 18, 2022
congbobo184
pushed a commit
to congbobo184/pulsar
that referenced
this pull request
Nov 8, 2022
This was referenced Nov 26, 2022
liangyepianzhou
pushed a commit
that referenced
this pull request
Dec 5, 2022
(cherry picked from commit 8f44c1a)
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 6, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #18023
Motivation
If the namespace policy inits without setting
managedLedgerOffloadThresholdInBytes(like : if usersetOffloadDeletionLagfirst and thengetOffloadThreshold), it will cause NPE when getOffloadThreshold.Documentation
doc-not-neededMatching PR in forked repository
PR in forked repository: https://github.com/Technoboy-/pulsar/pull/12