Skip to content

Conversation

@caoyang10
Copy link
Contributor

Fix Issue:
#4351

@wuyunfeng wuyunfeng self-assigned this Aug 14, 2020
@wuyunfeng wuyunfeng added area/doris-on-es Issues or PRs related to Doris on ElasticSearch kind/fix Categorizes issue or PR as related to a bug. labels Aug 14, 2020
@wuyunfeng wuyunfeng changed the title Fix Bug: ES queries always route at same 3 BE nodes (#4351) [Doris On ES][Bug-Fix] ES queries always route at same 3 BE nodes (#4351) Aug 14, 2020
@wuyunfeng wuyunfeng self-requested a review August 14, 2020 09:06
@wuyunfeng wuyunfeng linked an issue Aug 14, 2020 that may be closed by this pull request
if (usingRandomBackend) {
for (int i = 0; i < numBe; ++i) {
candidateBeList.add(backendList.get(beIndex++ % numBe));
candidateBeList.add(backendList.get(beIndex++ % backendList.size()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
candidateBeList.add(backendList.get(beIndex++ % backendList.size()));
candidateBeList.add(backendList.get(beIndex++ % size));

obtain size = backendList.size() in other place

Copy link
Member

@wuyunfeng wuyunfeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Looks good to me, but I left some minor comment

@caoyang10
Copy link
Contributor Author

I've obtained size = backendList.size() in the front of loop. Is it better?
please check the commit 6e17409

Copy link
Member

@wuyunfeng wuyunfeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add some UT to cover this case, but writing this is a bit complicated for you. At this time I would +1 and merge this PR soon. Thanks.

@wuyunfeng wuyunfeng added the approved Indicates a PR has been approved by one committer. label Aug 17, 2020
@wuyunfeng wuyunfeng merged commit 53d00d9 into apache:master Aug 18, 2020
@EmmyMiao87 EmmyMiao87 added the branch-0.13 PR which need to merge to branch 0.13 label Aug 18, 2020
@EmmyMiao87 EmmyMiao87 mentioned this pull request Aug 18, 2020
acelyc111 pushed a commit to acelyc111/incubator-doris that referenced this pull request Aug 21, 2020
…ache#4351) (apache#4352)

resolve the problem of querying ES table always route at same 3 BE nodes because of random strategy
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
yiguolei pushed a commit to yiguolei/incubator-doris that referenced this pull request Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/doris-on-es Issues or PRs related to Doris on ElasticSearch branch-0.13 PR which need to merge to branch 0.13 kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants