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][tiered-storage] move the state check forward #17020

Merged
merged 3 commits into from
Aug 11, 2022

Conversation

zymap
Copy link
Member

@zymap zymap commented Aug 9, 2022


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().

Modifications

move the state check forward

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 yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

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)

---

*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()`.
@zymap zymap added type/bug The PR fixed a bug or issue reported a bug release/2.10.2 labels Aug 9, 2022
@zymap zymap self-assigned this Aug 9, 2022
@zymap
Copy link
Member Author

zymap commented Aug 10, 2022

@hangc0276 Resolved. PTAL

@Technoboy- Technoboy- added this to the 2.11.0 milestone Aug 11, 2022
@zymap zymap merged commit ee0ea3a into apache:master 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()`.
@github-actions
Copy link

@zymap Please provide a correct documentation label for your PR.
Instructions see Pulsar Documentation Label Guide.

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()`.
@github-actions
Copy link

@zymap Please provide a correct documentation label for your PR.
Instructions see Pulsar Documentation Label Guide.

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)
@zymap zymap added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Aug 16, 2022
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)
@zymap zymap added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Sep 15, 2022
@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Sep 15, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants