Repository navigation
Fixed used after recycle issue in OpAddEntry - #12103
Merged
Merged
Conversation
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) |
codelipenghui
approved these changes
Sep 22, 2021
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 |
Contributor
Author
|
I don't think that would explain an out of order scenario, but yes, we should cherry pick into 2.8 |
merlimat
added a commit
that referenced
this pull request
Oct 30, 2021
lhotari
pushed a commit
to lhotari/pulsar
that referenced
this pull request
Nov 1, 2021
(cherry picked from commit 98a5bca)
lhotari
pushed a commit
to datastax/pulsar
that referenced
this pull request
Nov 19, 2021
(cherry picked from commit 3c4597d)
codelipenghui
pushed a commit
that referenced
this pull request
Dec 11, 2021
(cherry picked from commit 3c4597d)
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
2 of 3 tasks
3 tasks done
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.
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
OpAddEntryinstance 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
OpAddEntryinstance.