You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
LogRecordReadContextreadContext =
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 LIMIT scan / LimitBatchScanner.pollBatch().
Close the scanner. The read-context allocator is never closed.
Activity