Skip to content

[Doris On ES][Bug] ES queries always route at same 3 BE nodes #4351

@caoyang10

Description

@caoyang10

I create a external ES table and test some queries on ES.Then I find all of the queries route at same 3 BE nodes.
I find the code at fe/fe-core/src/main/java/org/apache/doris/planner/EsScanNode.java
227: candidateBeList.add(backendList.get(beIndex++ % numBe));
numBe is always 3 when number of be is greater than 3. So that candidateBeList always add 3 front of beckendList.
It should be corrected like:
candidateBeList.add(backendList.get(beIndex++ % backendList.size()));
Then FE can balance ES queries between BE nodes.

Metadata

Metadata

Labels

area/doris-on-esIssues or PRs related to Doris on ElasticSearchkind/fixCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions