polyzos commented on code in PR #2948:
URL: https://github.com/apache/fluss/pull/2948#discussion_r3015479893
##########
fluss-client/src/main/java/org/apache/fluss/client/table/scanner/log/LogFetcher.java:
##########
@@ -387,6 +393,11 @@ private synchronized void handleFetchLogResponse(
LogRecords logRecords =
fetchResultForBucket.recordsOrEmpty();
if (!MemoryLogRecords.EMPTY.equals(logRecords)
|| fetchResultForBucket.getErrorCode() !=
Errors.NONE.code()) {
+ // Retain the parsed buffer so it stays alive
while
+ // this CompletedFetch's records are being
consumed.
+ if (parsedByteBuf != null) {
+ parsedByteBuf.retain();
Review Comment:
retain() is called even for error-only buckets where logRecords is EMPTY...
the
buffer is not needed in that case. Only retain when hasRecords is true.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]