Skip to content

[CELEBORN-2356] Fix NPE before null-check in handleChunkFetchRequest#3731

Open
afterincomparableyum wants to merge 1 commit into
apache:mainfrom
afterincomparableyum:CELEBORN-2356
Open

[CELEBORN-2356] Fix NPE before null-check in handleChunkFetchRequest#3731
afterincomparableyum wants to merge 1 commit into
apache:mainfrom
afterincomparableyum:CELEBORN-2356

Conversation

@afterincomparableyum

@afterincomparableyum afterincomparableyum commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

getStreamState returns null for an unknown id. The streamState.buffers pattern match dereferences it before the null guard runs, throwing NullPointerException. The intended ChunkFetchFailure reply is unreachable. Here we should reorder null-check first, then compute storageMetrics.

Why are the changes needed?

To prevent potential NPEs.

Does this PR resolve a correctness bug?

  • Yes

Does this PR introduce any user-facing change?

  • Yes

How was this patch tested?

CI/CD Unit tests.

getStreamState returns null for an unknown id. The streamState.buffers pattern match dereferences it before the null guard runs, throwing NullPointerException. The intended ChunkFetchFailure reply is unreachable. Here we should reorder null-check first, then compute storageMetrics.
@github-actions github-actions Bot added module:worker correctness Correctness bugfix labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant