[fix][Offload] fix indexEntries NullPointerException error#22035
[fix][Offload] fix indexEntries NullPointerException error#22035graysonzeng wants to merge 2 commits intoapache:masterfrom
Conversation
@Technoboy- thanks. done |
Wouldn't that be a problem if the object instance gets recycled multiple times? |
maybe |
There have been bugs in the past with recycled objects that are caused by releasing the object multiple times. |
yes, but for this patch, it's ok to fix it like this, right? |
I doubt that it's correct. The problem will become worse if it is "fixed" like this. I think that it is necessary to address the root cause. |
@Technoboy- @graysonzeng I have shared more context in #22110 about the "double release" bug pattern. |
|
it looks like ML read entries from an already closed ledger, read entries from a closed ledger will lead to exception, and then, ML will try to close the ledger again. I believe the key point is ML trying to read entries from a closed ledger. |
| dataObjectLength = -1; | ||
| dataHeaderLength = -1; | ||
| segmentMetadata = null; | ||
| indexEntries.clear(); |
There was a problem hiding this comment.
Remove this line cannot fix the root cause
|
@graysonzeng could please provide the steps that I can reproduce the issue? |
This is an occasional error that occurs only once. I can't try to reproduce it @dao-jun |
|
@graysonzeng what's your pulsar version? could you please provide more log? |
|
Closing and |
|
related PR: #22162 |
|
Thanks for the fix, I'll close it once the related PR is merged @dao-jun |
|
the pr closed automatically since #22162 merged. |
Motivation
Offloader exception occurs
Modifications
check indexEntries is not null
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 the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: