Fix check read failed entry memory leak issue.#4513
Merged
Conversation
| lh.asyncReadEntries(entryIdToRead, entryIdToRead, (rc, ledHan, seq, ctx) -> { | ||
| long thisEntryId = (Long) ctx; | ||
| if (rc == BKException.Code.OK) { | ||
| LedgerEntry entry = seq.nextElement(); |
Contributor
There was a problem hiding this comment.
Is it possible for seq to have multiple elements? It would be better to check with hasMoreElements here.
Member
There was a problem hiding this comment.
I think
- hasMoreElements needs to be judged.
- at the same time, if (rc == BKException.Code.OK) is true or not, this release needs to be added.
- then I suggest adding a testcase to cover it.
Member
Author
There was a problem hiding this comment.
Is it possible for seq to have multiple elements? It would be better to check with hasMoreElements here.
Make sense.
at the same time, if (rc == BKException.Code.OK) is true or not, this release needs to be added.
For this case, if the rc == BKException.Code.OK is false, the seq will be null, we don't need to release the seq.
merlimat
pushed a commit
that referenced
this pull request
May 30, 2025
* Fix check read failed entry memory leak issue. * address the comments.
merlimat
pushed a commit
that referenced
this pull request
Jun 2, 2025
* Fix check read failed entry memory leak issue. * address the comments.
priyanshu-ctds
pushed a commit
to datastax/bookkeeper
that referenced
this pull request
Jul 11, 2025
* Fix check read failed entry memory leak issue. * address the comments. (cherry picked from commit 9b8e566)
sandeep-ctds
pushed a commit
to datastax/bookkeeper
that referenced
this pull request
Jul 22, 2025
* Fix check read failed entry memory leak issue. * address the comments. (cherry picked from commit 9b8e566)
manas-ctds
pushed a commit
to datastax/bookkeeper
that referenced
this pull request
Feb 27, 2026
* Fix check read failed entry memory leak issue. * address the comments. (cherry picked from commit f0c406b)
dlg99
pushed a commit
to datastax/bookkeeper
that referenced
this pull request
Feb 27, 2026
* Fix check read failed entry memory leak issue. * address the comments. (cherry picked from commit f0c406b)
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.
When checking the read failed entry, it doesn't release the data when read successfully.