You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "fxbing (via GitHub)" <gi...@apache.org> on 2026/09/16 08:26:47 UTC

[PR] [client] Release KvBatchScanner response buffers [fluss]

fxbing opened a new pull request, #4364:
URL: https://github.com/apache/fluss/pull/4364

   ### Purpose
   
   Closes #4363
   
   Fix network buffer leaks in no-limit primary-key batch scans, including when results are fully consumed and the scanner is closed normally.
   
   Related to #3003, which addresses `LimitBatchScanner`.
   
   ### Brief change log
   
   - Release consumed `ScanKvResponse` buffers in `finally`, covering data, empty, error, and parsing-failure paths.
   - Replace cancellation of the pending future with a completion callback that releases completed or late responses.
   - Release close-scanner responses.
   
   `getRecords()` copies the data, so returned rows remain valid after the response buffer is released.
   
   ### Tests
   
   Added regression coverage using real serialized and parsed responses, with explicit reference-count assertions, row reads after buffer release, and exactly-once release verification.
   
   The four minimal reproductions fail before the fix (`refCnt == 1`) and pass afterward (`refCnt == 0`).
   
   Passed locally:
   - `KvBatchScannerTest`: 28 tests.
   - `CompositeBatchScannerTest`: 5 tests.
   - `KvSnapshotAndLogBatchScannerTest`: 1 test.
   - `TableKvScanITCase`: 9 tests.
   - Checkstyle, Spotless, and license validation.
   
   The full repository suite was not run. Other previously observed CI leak warnings have not been individually attributed.
   
   ### API and Format
   
   No public API or storage-format changes.
   
   ### Documentation
   
   No user-facing documentation changes required.
   
   ### Generative AI disclosure
   
   AI-assisted implementation and review using Codex, Claude, and GLM.


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [client] Release KvBatchScanner response buffers [fluss]

Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 merged PR #4364:
URL: https://github.com/apache/fluss/pull/4364


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org