-
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][tiered-storage] move the state check forward #17020
Merged
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
--- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get a NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause a NPE when `getLastAddCOnfirmed()`.
hangc0276
reviewed
Aug 10, 2022
...in/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java
Show resolved
Hide resolved
@hangc0276 Resolved. PTAL |
hangc0276
approved these changes
Aug 11, 2022
codelipenghui
approved these changes
Aug 11, 2022
coderzc
pushed a commit
to coderzc/pulsar
that referenced
this pull request
Aug 13, 2022
* [fix][tiered-storage] move the state check forward --- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get an NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause an NPE when `getLastAddCOnfirmed()`.
Technoboy-
pushed a commit
to Technoboy-/pulsar
that referenced
this pull request
Aug 14, 2022
* [fix][tiered-storage] move the state check forward --- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get an NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause an NPE when `getLastAddCOnfirmed()`.
@zymap Please provide a correct documentation label for your PR. |
Technoboy-
pushed a commit
that referenced
this pull request
Aug 15, 2022
* [fix][tiered-storage] move the state check forward --- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get an NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause an NPE when `getLastAddCOnfirmed()`.
@zymap Please provide a correct documentation label for your PR. |
hangc0276
pushed a commit
that referenced
this pull request
Aug 16, 2022
* [fix][tiered-storage] move the state check forward --- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get an NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause an NPE when `getLastAddCOnfirmed()`. (cherry picked from commit ee0ea3a)
Technoboy-
pushed a commit
to merlimat/pulsar
that referenced
this pull request
Aug 16, 2022
* [fix][tiered-storage] move the state check forward --- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get an NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause an NPE when `getLastAddCOnfirmed()`.
Jason918
pushed a commit
that referenced
this pull request
Sep 4, 2022
* [fix][tiered-storage] move the state check forward --- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get an NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause an NPE when `getLastAddCOnfirmed()`. (cherry picked from commit ee0ea3a)
zymap
added a commit
that referenced
this pull request
Sep 15, 2022
* [fix][tiered-storage] move the state check forward --- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get an NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause an NPE when `getLastAddCOnfirmed()`. (cherry picked from commit ee0ea3a)
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Sep 16, 2022
* [fix][tiered-storage] move the state check forward --- *Motivation* Move the close check forward to avoid `getLastAddConfirmed()` get an NPE. If the state is closed. That means the resource is closed and the `OffloadIndexBlock` has been recycled. Which will cause an NPE when `getLastAddCOnfirmed()`. (cherry picked from commit ee0ea3a) (cherry picked from commit 17b84b6)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-2.8
Archived: 2.8 is end of life
cherry-picked/branch-2.9
Archived: 2.9 is end of life
cherry-picked/branch-2.10
cherry-picked/branch-2.11
doc-not-needed
Your PR changes do not impact docs
release/2.7.6
release/2.8.5
release/2.9.4
release/2.10.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
Move the close check forward to avoid
getLastAddConfirmed()
getan NPE.
If the state is closed. That means the resource is closed and the
OffloadIndexBlock
has been recycled. Which will cause an NPE whengetLastAddCOnfirmed()
.Modifications
move the state check forward
Verifying this change
(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:)
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)