[client] LimitBatchScanner leaks Arrow read context on log-table LIMIT scan
维护者通常 2 天内回复
评估
调研方向
从 fluss-client 中 LimitBatchScanner 的实现里的 parseLimitScanResponse() 开始,重点关注调用 LogRecordReadContext.createReadContext() 的日志表路径。确保 read context 在解析完成后以及解析失败时都能关闭;完成的标准是 LIMIT 扫描在 scanner 关闭之前释放 Arrow allocator。
由索引模型根据 Issue 内容生成。
描述
Description
LimitBatchScanner.parseLimitScanResponse() creates a LogRecordReadContext for log tables (no primary key) and never closes it.
For Arrow log format, LogRecordReadContext.createReadContext() allocates a RootAllocator backed by the scanner's ChunkedFactory. The record iterator is closed, and rows are deep-copied, but the read context itself is left open. LimitBatchScanner.close() only closes chunkedFactory, so the allocator and its off-heap chunks can leak on every LIMIT scan of an Arrow log table.
LogRecordReadContext readContext =
LogRecordReadContext.createReadContext(...);
// iterated, then dropped without readContext.close()
This is a different path from #4345 (LogFetcher / LogScannerImpl close chain).
Expected
LogRecordReadContext is closed after parsing (including on parse failure), so Arrow allocators are released before the scanner is closed.
How to reproduce
- Create an Arrow log table (no primary key).
- Run a
LIMITscan /LimitBatchScanner.pollBatch(). - Close the scanner. The read-context allocator is never closed.
Component
fluss-client — LimitBatchScanner
- 主要语言
- Java
- 星标
- 2.2k
- 派生
- 668
- 平均合并
- 3 天 4 小时
- 30 天内合并 PR
- 146
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/fluss 的其他 Issue
-
[lake/iceberg] Reserved write-mode properties can be set and reset through their `iceberg.` key可能已有人在做 @aphenix-r7 于 23 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
[common] Decimal#hashCode is inconsistent with Decimal#equals可能已有人在做 @firasbouzazi 于 35 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
[security] PlainSaslServerProvider conflicts with Hadoop SASL provider causing authentication failure可能已有人在做 @xinzhang-hello 于 41 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 2 天内回复
-
[server] KV snapshot scheduling stops permanently after a transient snapshot-init failure可能已有人在做 @zhang-arvin 于 40 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
[docs] Document advertised-resource and ACL principal ignore-case options可能已有人在做 @EchoLee5 于 53 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 2 天内回复
相似的 Issue
-
bug main ui
难度 2/5 1-3 小时 新手友好度 78/100
openhab/openhab-webui#4671 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 64/100
NearVanilla/IceCream#109 ·
维护者通常 1 天内回复
-
getRawTextContent() returns the lines of every page in reverse order (bottom to top) since 4.0.3未关闭
难度 1/5 1-3 小时 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 82/100
bancolombia/bin-stash#79 ·
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复