Skip to content

Fixed used after recycle issue in OpAddEntry - #12103

Merged
merlimat merged 1 commit into
apache:masterfrom
merlimat:op-add-entry
Sep 22, 2021
Merged

merlimat merged 1 commit into
apache:masterfrom
merlimat:op-add-entry

Conversation

@merlimat

Copy link
Copy Markdown
Contributor

Motivation

After a write failure, a task is scheduled in background to force close the ledger and trigger the creation of a new one. If the the OpAddEntry instance is already recycled, that could lead to either a NPE or undefined behavior.

Modifications

Copy the reference to a final variable so the background task will not be dependent on the lifecycle of OpAddEntry instance.

@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Sep 20, 2021
@merlimat merlimat added this to the 2.9.0 milestone Sep 20, 2021
@merlimat merlimat self-assigned this Sep 20, 2021
@Anonymitaet

Copy link
Copy Markdown
Member

@merlimat Thanks for your contribution. For this PR, do we need to update docs?

(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@merlimat merlimat added the doc-not-needed Your PR changes do not impact docs label Sep 22, 2021
@merlimat
merlimat merged commit 3c4597d into apache:master Sep 22, 2021
@michaeljmarshall

michaeljmarshall commented Oct 29, 2021 •

Copy link
Copy Markdown
Member

@merlimat - I just ran into this NPE running 2.8.0. I am investigating a report of messages persisted out of order. Do you think this NPE could lead to such behavior? Could we cherry pick this to branch-2.8 before we release 2.8.2? Also, if we're going to do another release for 2.7, should we cherry pick it to that branch? Let me know what you think, thanks!

@merlimat
merlimat deleted the op-add-entry branch October 30, 2021 14:53
@merlimat

Copy link
Copy Markdown
Contributor Author

I don't think that would explain an out of order scenario, but yes, we should cherry pick into 2.8

@merlimat merlimat added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Oct 30, 2021
lhotari pushed a commit to lhotari/pulsar that referenced this pull request Nov 1, 2021
lhotari pushed a commit to datastax/pulsar that referenced this pull request Nov 19, 2021
codelipenghui pushed a commit that referenced this pull request Dec 11, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Dec 11, 2021
@lhotari lhotari mentioned this pull request Mar 8, 2022
1 of 3 tasks
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Shawyeok pushed a commit to Shawyeok/pulsar that referenced this pull request Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/branch-2.7 Archived: 2.7 is end of life cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.7.4 release/2.8.2 release/2.9.0 type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants