ConeyLiu opened a new issue, #2790: URL: https://github.com/apache/uniffle/issues/2790
### 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 When an application is removed by the shuffle server and the same application ID is later registered again with a different shuffle, a retry that requests the result of an old shuffle can receive `SUCCESS` with an empty bitmap. The current flow is: 1. `ShuffleTaskManager#getFinishedBlockIds` calls `refreshAppId`, which recreates an empty `ShuffleTaskInfo` when the application no longer exists. 2. A missing `ShuffleBuffer` is logged and skipped. 3. The block ID manager returns an empty byte array for the missing shuffle. 4. The gRPC service wraps that empty result with `SUCCESS`. This makes missing registration metadata indistinguishable from a legitimately empty partition and can silently drop data. Expected behavior: a request for an application, shuffle, or partition whose registration metadata is missing should return `NO_REGISTER`. A registered shuffle with no finished blocks should continue to return a successful empty bitmap. The query should also be protected from concurrent application cleanup by the existing application read/write lock. ### Affects Version(s) master ### Uniffle Server Log Output ```logtalk The server logs that the shuffle buffer is empty, then returns a successful response with an empty bitmap. ``` ### Uniffle Engine Log Output ```logtalk ``` ### Uniffle Server Configurations ```yaml ``` ### Uniffle Engine Configurations ```yaml ``` ### Additional context A focused fix can avoid creating application state in the read path, hold the existing application read lock while validating/querying metadata, and map `NoRegisterException` to `NO_REGISTER` in both shuffle-result RPCs. Regression coverage should verify both missing old shuffle metadata and a legitimately empty registered shuffle. ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
