Code of Conduct
Search before asking
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:
ShuffleTaskManager#getFinishedBlockIds calls refreshAppId, which recreates an empty ShuffleTaskInfo when the application no longer exists.
- A missing
ShuffleBuffer is logged and skipped.
- The block ID manager returns an empty byte array for the missing shuffle.
- 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
The server logs that the shuffle buffer is empty, then returns a successful response with an empty bitmap.
Uniffle Engine Log Output
Uniffle Server Configurations
Uniffle Engine Configurations
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?
Code of Conduct
Search before asking
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
SUCCESSwith an empty bitmap.The current flow is:
ShuffleTaskManager#getFinishedBlockIdscallsrefreshAppId, which recreates an emptyShuffleTaskInfowhen the application no longer exists.ShuffleBufferis logged and skipped.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
Uniffle Engine Log Output
Uniffle Server Configurations
Uniffle Engine Configurations
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
NoRegisterExceptiontoNO_REGISTERin 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?