Skip to content

[Doris On ES][Bug-Fix] ES queries always route at same 3 BE nodes (#4351) - #4352

Merged
wuyunfeng merged 2 commits into
apache:masterfrom
caoyang10:master
Aug 18, 2020
Merged

[Doris On ES][Bug-Fix] ES queries always route at same 3 BE nodes (#4351)#4352
wuyunfeng merged 2 commits into
apache:masterfrom
caoyang10:master

Conversation

@caoyang10

Copy link
Copy Markdown
Contributor

Fix Issue:
#4351

@wuyunfengwuyunfeng self-assigned this Aug 14, 2020
@wuyunfengwuyunfeng 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
@wuyunfengwuyunfeng 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
@wuyunfengwuyunfeng 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
Copy Markdown
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

@wuyunfengwuyunfeng left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

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

@wuyunfengwuyunfeng left a comment

Copy link
Copy Markdown
Member

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.

@wuyunfengwuyunfeng added the approved Indicates a PR has been approved by one committer. label Aug 17, 2020
@wuyunfeng
wuyunfeng merged commit 53d00d9 into apache:masterAug 18, 2020
@EmmyMiao87EmmyMiao87 added the branch-0.13 PR which need to merge to branch 0.13 label Aug 18, 2020
@EmmyMiao87EmmyMiao87 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
@yangzhgyangzhg 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.area/doris-on-esIssues or PRs related to Doris on ElasticSearchbranch-0.13PR which need to merge to branch 0.13kind/fixCategorizes 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

@caoyang10@wuyunfeng@EmmyMiao87