Skip to content

[Bug] Missing shuffle metadata may be returned as a successful empty bitmap #2790

Description

@ConeyLiu

Code of Conduct

Search before asking

  • I have searched in the issues 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

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?

  • Yes I am willing to submit a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions