swuferhong opened a new issue, #3650: URL: https://github.com/apache/fluss/issues/3650
### Search before asking - [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar. ### Motivation ### Description `KvManager.shutdown()` currently closes all KV tablets sequentially. Each `KvTablet.close()` waits for its write lock and closes the corresponding RocksDB instance before the next tablet can start closing. When a TabletServer contains many KV tablets, the shutdown latency grows linearly with the number of tablets. This may cause the TabletServer to exceed the process termination grace period and eventually result in an unclean shutdown. ### Observed behavior The issue was observed in a cluster containing approximately 32,000 buckets (no data). In one TabletServer shutdown: - `KvManager` started shutting down at `13:20:42.235`. - `KvManager` completed shutting down at `13:21:11.705`. - The total `KvManager` shutdown time was approximately **29,470 ms**. In another test with KV data (3GB per bucket), the intervals between consecutive close-start logs can be used to approximate the preceding tablet's close time: - Minimum: approximately **10 ms** - Maximum: approximately **953 ms** - Average: approximately **236 ms** ### Solution _No response_ ### Anything else? _No response_ ### Willingness to contribute - [x] I'm willing to submit a PR! -- 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]
