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

[BUG][AQE][LocalOrder] Remove check of discontinuous map task ids #354

Merged
merged 2 commits into from
Nov 24, 2022

Conversation

zuston
Copy link
Member

@zuston zuston commented Nov 23, 2022

What changes were proposed in this pull request?

Remove check of discontinuous map task ids

Why are the changes needed?

In the [startMapIndex, endMapIndex) sequence, the index is not the map task id, which only indicate the range of the succeed map task ids set.

So that means. if the range is [0, 5), it only indicate the number of tasks is 5. And the task id list may be as follows:

[task-1, task-3, task-9, task-15, task-16]

Does this PR introduce any user-facing change?

No

How was this patch tested?

  1. UTs

@zuston zuston linked an issue Nov 23, 2022 that may be closed by this pull request
3 tasks
@zuston zuston requested a review from jerqi November 23, 2022 10:08
@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2022

Codecov Report

Merging #354 (0d777b6) into master (16a63e2) will decrease coverage by 0.09%.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##             master     #354      +/-   ##
============================================
- Coverage     58.40%   58.30%   -0.10%     
+ Complexity     1554     1550       -4     
============================================
  Files           193      193              
  Lines         10758    10754       -4     
  Branches        935      936       +1     
============================================
- Hits           6283     6270      -13     
- Misses         4104     4111       +7     
- Partials        371      373       +2     
Impacted Files Coverage Δ
...ffle/common/segment/LocalOrderSegmentSplitter.java 79.68% <50.00%> (-14.44%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -128,23 +129,13 @@ public List<ShuffleDataSegment> split(ShuffleIndexResult shuffleIndexResult) {
}

if (expectTaskIds.contains(taskAttemptId)) {
if (bufferOffset != 0 && index - lastExpectedBlockIndex > 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we remove this?

Copy link
Member Author

Choose a reason for hiding this comment

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

This checking logic is to check the discontinuous blocks in a ordered sequence. So this will throw exception when encountering the discontinuous task map ids

Copy link
Contributor

Choose a reason for hiding this comment

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

I got it.

&& bufferSegments.size() > 0
&& (expectTaskIds.contains(taskAttemptId) ? index - lastExpectedBlockIndex != 1 : true))
|| bufferOffset >= readBufferSize) {
boolean condition1 =
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we give this a better name?

Copy link
Member Author

Choose a reason for hiding this comment

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

conditionOfdiscontinuousBlocks

Copy link
Contributor

Choose a reason for hiding this comment

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

OK.

&& expectTaskIds.contains(taskAttemptId)
&& index - lastExpectedBlockIndex != 1;

boolean condition2 = bufferOffset >= readBufferSize;
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto.

Copy link
Member Author

Choose a reason for hiding this comment

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

conditionOfBufferSize

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok.

Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @zuston Could you fix the flaky test?

@jerqi jerqi merged commit 91eef08 into apache:master Nov 24, 2022
@zuston
Copy link
Member Author

zuston commented Nov 24, 2022

LGTM, thanks @zuston Could you fix the flaky test?

OK. Let me take a look.

By the way, the local_order looks good in our internal environment. But If having the memory skipping, AQE will benefit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][AQE][LocalOrder] Incorrect check of discontinuous blocks
3 participants