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

[CELEBORN-1838] Interrupt spark task should not report fetch failure #3080

Closed
wants to merge 2 commits into from

Conversation

turboFei
Copy link
Member

@turboFei turboFei commented Jan 22, 2025

Backport #3070 to main branch.

What changes were proposed in this pull request?

Do not trigger fetch failure if a spark task attempt is interrupted(speculation enabled). Do not trigger fetch failure if the RPC of getReducerFileGroup is timeout. This PR is intended for celeborn-0.5 branch.

Why are the changes needed?

Avoid unnecessary fetch failures and stage re-runs.

Does this PR introduce any user-facing change?

NO.

How was this patch tested?

  1. GA.
  2. Manually tested on cluster with spark speculation tasks.

Here is the test case

sc.parallelize(1 to 100, 100).flatMap(i => {
        (1 to 150000).iterator.map(num => num)
      }).groupBy(i => i, 100)
      .map(i => {
        if (i._1 < 5) {
          Thread.sleep(15000)
        }
        i
      })
      .repartition(400).count

截屏2025-01-18 16 16 16 截屏2025-01-18 16 16 22 截屏2025-01-18 16 19 15 截屏2025-01-18 16 17 27

Closes #3070 from FMX/branch-0.5-b1838.

Authored-by: mingji [email protected]

FMX and others added 2 commits January 22, 2025 21:11
What changes were proposed in this pull request?
Do not trigger fetch failure if a spark task attempt is interrupted(speculation enabled).
Do not trigger fetch failure if the RPC of getReducerFileGroup is timeout.
This PR is intended for celeborn-0.5 branch.

Why are the changes needed?
Avoid unnecessary fetch failures and stage re-runs.

Does this PR introduce any user-facing change?
NO.

How was this patch tested?
1. GA.
2. Manually tested on cluster with spark speculation tasks.

Here is the test case
```scala
sc.parallelize(1 to 100, 100).flatMap(i => {
        (1 to 150000).iterator.map(num => num)
      }).groupBy(i => i, 100)
      .map(i => {
        if (i._1 < 5) {
          Thread.sleep(15000)
        }
        i
      })
      .repartition(400).count
```

<img width="1384" alt="截屏2025-01-18 16 16 16" src="https://github.com/user-attachments/assets/adf64857-5773-4081-a7d0-fa3439e751eb" />
<img width="1393" alt="截屏2025-01-18 16 16 22" src="https://github.com/user-attachments/assets/ac9bf172-1ab4-4669-a930-872d009f2530" />
<img width="1258" alt="截屏2025-01-18 16 19 15" src="https://github.com/user-attachments/assets/6a8ff3e1-c1fb-4ef2-84d8-b1fc6eb56fa6" />
<img width="892" alt="截屏2025-01-18 16 17 27" src="https://github.com/user-attachments/assets/f9de3841-f7d4-4445-99a3-873235d4abd0" />

Closes apache#3070 from FMX/branch-0.5-b1838.

Authored-by: mingji <[email protected]>
Signed-off-by: Wang, Fei <[email protected]>
@turboFei turboFei requested a review from FMX January 22, 2025 14:36
celebornShuffleId: Int,
ce: Throwable): Unit = {
if (ce.getCause != null &&
(ce.getCause.isInstanceOf[InterruptedException] || ce.getCause.isInstanceOf[
Copy link
Member Author

Choose a reason for hiding this comment

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

Here for the InterruptedException, even #2921 can handle it.

But this PR is more efficient, it do not need to talk with driver and prevent the stage-run for InterruptedException directly.

Copy link
Contributor

@FMX FMX 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. Although spark speculation tasks won't be a problem because they won't throw fetch failures after #2921, the timeout exception might be problematic. This will handle the timeout exception and let the task retry.

@turboFei
Copy link
Member Author

turboFei commented Jan 23, 2025

thanks, merging(backport) to main

@turboFei turboFei closed this in 75b697d Jan 23, 2025
@turboFei turboFei deleted the b1838 branch January 23, 2025 06:47
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.

2 participants