You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "swuferhong (via GitHub)" <gi...@apache.org> on 2025/09/18 02:00:58 UTC
[I] Cluster#getRandomTabletServer() does not truly randomly retrieve a TabletServer [fluss]
swuferhong opened a new issue, #1718:
URL: https://github.com/apache/fluss/issues/1718
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
### Fluss version
main (development)
### Please describe the bug 🐞
`Cluster#getRandomTabletServer()` does not truly randomly retrieve a `TabletServer`. The current implementation of `getRandomTabletServer` always retrieves the first element from the map iterator, which results in consistently selecting `TabletServer-0`.
`
public ServerNode getRandomTabletServer() {
// TODO this method need to get one tablet server according to the load.
List<ServerNode> serverNodes = new ArrayList<>(aliveTabletServersById.values());
return !serverNodes.isEmpty() ? serverNodes.get(0) : null;
}
`
PR #1303 changes most `read-only admin operations` through the `getRandomTabletServer` method. Since the selection is not actually random, this places excessive pressure on `TabletServer-0`—particularly for `Admin#listPartitionInfos(TablePath tablePath)` requests, which often take 5–7 seconds. This issue does not involve optimizing `Admin#listPartitionInfos(TablePath tablePath)`; it only aims to change the pseudo-random selection into a truly random one, thereby reducing the load on `TabletServer-0`.
### Solution
_No response_
### Are you willing to submit a PR?
- [ ] 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: issues-unsubscribe@fluss.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Cluster#getRandomTabletServer() does not truly randomly retrieve a TabletServer [fluss]
Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong closed issue #1718: Cluster#getRandomTabletServer() does not truly randomly retrieve a TabletServer
URL: https://github.com/apache/fluss/issues/1718
--
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
For queries about this service, please contact Infrastructure at:
users@infra.apache.org