apache / apache/uniffle

[Improvement] Release preAllocatedBuffer when unregisterShuffleByAppId request

Open
#1,945 0 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.

### What would you like to be improved?

Release memory when unregisterShuffleByAppId invoked, rather than release it by `checkResource` background thread.

```
[2024-07-23 15:16:14.233] succeeded=true allowed=true cmd=unregisterShuffleByAppId statusCode=SUCCESS appId=application_1703049085550_16568008_1721718824735 shuffleId=-1 executionTimeUs=96 args:{null}
[2024-07-23 15:18:28.153] [checkResource-0] [WARN] ShuffleTaskManager - Remove expired preAllocatedBuffer[id=24467] that required by app: application_1703049085550_16568008_1721718824735
[2024-07-23 15:18:28.153] [checkResource-0] [WARN] ShuffleTaskManager - Remove expired preAllocatedBuffer[id=24468] that required by app: application_1703049085550_16568008_1721718824735
```

### How should we improve?

_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 ShuffleTaskManager and trace unregisterShuffleByAppId alongside the checkResource background cleanup for preAllocatedBuffer entries. Verify the request path releases buffers associated with the application immediately, rather than leaving them for the expiration check, and confirm existing behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.