apache / apache/uniffle

[Bug] The failure of the reporting block led to an abnormal backward shift.

Open
#2,480 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
454
Forks
172
Avg merge
5d 17h
Merged PRs (30d)
5

Description

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### Search before asking

- [x] I have searched in the [issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and found no similar issues.

### Describe the bug

After writing the data block, all the block metadata will be reported to the Shuffle Server. However, in reportShuffleResult, when handling exceptions, only an alarm log is recorded.
I met some online abnormalities, thread is interrupted when reporting block of metadata, may be because of a timeout, then the APP normal execution, when get the Read end block of metadata, getShuffleResult or getShuffleResultForMultiPart method will have check metadata, At this point, due to inconsistent block metadata, an exception was thrown, masking the true cause of the error.

`public void reportShuffleResult(

try {

...

} catch (Exception e) {

// Here, the alarm logs are simply recorded.
LOG.warn(
"Report shuffle result is failed to "
+ ssi
+ " for appId["
+ appId
+ "], shuffleId["
+ shuffleId
+ "]");
...

}

}`

![Image](https://github.com/user-attachments/assets/0bdbf592-9255-4c2e-9faa-f2eaf85533be)
This will lead to the following exception.
![Image](https://github.com/user-attachments/assets/9720416f-b6cc-4b96-9a26-02ed7613a699)

### Affects Version(s)

0.11.0

### Uniffle Server Log Output

```logtalk

```

### Uniffle Engine Log Output

```logtalk

```

### Uniffle Server Configurations

```yaml

```

### Uniffle Engine Configurations

```yaml

```

### Additional context

_No response_

### Are you willing to submit PR?

- [x] Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start at reportShuffleResult and trace its exception-handling path, then read getShuffleResult and getShuffleResultForMultiPart where block metadata is checked. Reproduce or inspect the interrupted or timed-out reporting scenario and compare the resulting logs and metadata state. Done means a reporting failure does not leave a later read to mask the original error with an inconsistent-metadata exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.