Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](local shuffle) Fix unbalanced data distribution #44137

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

Gabriel39
Copy link
Contributor

@Gabriel39 Gabriel39 commented Nov 18, 2024

What problem does this PR solve?

Now LOCAL_EXCHANGE_OPERATOR (BUCKET_HASH_SHUFFLE) use a wrong buckets num to distribute rows so it got an unbalance distribution. This PR fix it.

Before:

LOCAL_EXCHANGE_OPERATOR (BUCKET_HASH_SHUFFLE) (id=-10):
                    - RowsProduced: sum 32.636547M (32636547), avg 2.719712M (2719712), max 10.932368M (10932368), min 0

After:

LOCAL_EXCHANGE_OPERATOR (BUCKET_HASH_SHUFFLE) (id=-10):
                    - RowsProduced: sum 32.636547M (32636547), avg 2.719712M (2719712), max 2.736918M (2736918), min 2.6938M (2693800)

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Gabriel39
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

924060929
924060929 previously approved these changes Nov 18, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 18, 2024
Copy link
Contributor

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.98% (9899/26064)
Line Coverage: 29.18% (82770/283644)
Region Coverage: 28.32% (42500/150086)
Branch Coverage: 24.89% (21554/86590)
Coverage Report: http://coverage.selectdb-in.cc/coverage/39e9d49f3cef340d05e24f461327e0b17a3246c2_39e9d49f3cef340d05e24f461327e0b17a3246c2/report/index.html

@Gabriel39
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.01% (9899/26040)
Line Coverage: 29.19% (82762/283572)
Region Coverage: 28.33% (42505/150061)
Branch Coverage: 24.89% (21556/86592)
Coverage Report: http://coverage.selectdb-in.cc/coverage/39e9d49f3cef340d05e24f461327e0b17a3246c2_39e9d49f3cef340d05e24f461327e0b17a3246c2/report/index.html

@Gabriel39
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Nov 18, 2024
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.00% (9897/26042)
Line Coverage: 29.18% (82747/283538)
Region Coverage: 28.31% (42486/150069)
Branch Coverage: 24.88% (21545/86594)
Coverage Report: http://coverage.selectdb-in.cc/coverage/44eddc4983811d52b6821d335011aa3e95f8d8b9_44eddc4983811d52b6821d335011aa3e95f8d8b9/report/index.html

Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 19, 2024
@Gabriel39 Gabriel39 merged commit 8cb6723 into apache:master Nov 19, 2024
26 of 29 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 19, 2024
Now `LOCAL_EXCHANGE_OPERATOR (BUCKET_HASH_SHUFFLE) ` use a wrong buckets
num to distribute rows so it got an unbalance distribution. This PR fix
it.

Before:
```
LOCAL_EXCHANGE_OPERATOR (BUCKET_HASH_SHUFFLE) (id=-10):
                    - RowsProduced: sum 32.636547M (32636547), avg 2.719712M (2719712), max 10.932368M (10932368), min 0
```

After:
```
LOCAL_EXCHANGE_OPERATOR (BUCKET_HASH_SHUFFLE) (id=-10):
                    - RowsProduced: sum 32.636547M (32636547), avg 2.719712M (2719712), max 2.736918M (2736918), min 2.6938M (2693800)
```
Gabriel39 added a commit that referenced this pull request Nov 22, 2024
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. dev/3.0.x p0_b reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants