You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "EchoLee5 (via GitHub)" <gi...@apache.org> on 2026/09/16 01:42:53 UTC
[I] [client][server] Close remaining scanners and native resources when one close fails [fluss]
EchoLee5 opened a new issue, #4354:
URL: https://github.com/apache/fluss/issues/4354
## Description
Several close/shutdown paths still stop after the first failure, so later resources leak. This is the same class of bug as #4345, but on other modules.
### 1. `KvManager.shutdown()`
Write buffers use `IOUtils.closeQuietly`, but the rest are bare `close()` calls:
- `arrowBufferAllocator`
- `memorySegmentPool`
- `sharedRocksDBRateLimiter`
- `sharedBlockCache`
If the Arrow allocator close throws, the memory pool and RocksDB caches are skipped on TabletServer shutdown.
### 2. `LakeSnapshotAndLogSplitScanner.close()`
`logScanner.close()` runs first. If it throws, lake record iterators (Paimon/Iceberg readers) are never closed. Closing iterators is also sequential.
### 3. `BatchScanUtils.collectLimitedRows()`
If `pollBatch()` throws, the current scanner and remaining queued scanners are not closed. The leftover close loop also aborts on the first close failure. `CompositeBatchScanner` with a `limit` uses this path.
### 4. `LogSegments.close()`
A for-loop of `logSegment.close()`. One segment failure leaves later log/index file handles open.
## Expected
Close remaining resources with `IOUtils.closeAll` / `closeQuietly` so one failure does not skip the rest.
## Component
`fluss-client`, `fluss-server`
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org