swuferhong opened a new issue, #3653: URL: https://github.com/apache/fluss/issues/3653
### Search before asking - [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar. ### Motivation During controlled shutdown, the coordinator needs to migrate bucket leaders away from the shutting-down tablet server. Currently this path processes leader buckets one by one. Each bucket does synchronous ZooKeeper read/update of LeaderAndIsr, which becomes expensive when a tablet server owns many leader buckets. In one test with `10,131` leader buckets, controlled shutdown leader state changes took about `113s`, while dispatching the batched tablet server requests only took `22ms`. The main cost was ZooKeeper reads and updates. We can improve this by batching LeaderAndIsr reads and updates for the controlled shutdown path, while preserving the existing leader election semantics. The optimized path should be limited to controlled shutdown, and should fall back to the existing individual update path when batch reads are incomplete or batch updates fail. ### Solution _No response_ ### Anything else? _No response_ ### Willingness to contribute - [ ] 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]
