Skip to content

fixes NPE in bulkv1 code after failure - #6622

Merged
keith-turner merged 2 commits into
apache:2.1from
keith-turner:fix_npe
Oct 30, 2026
Merged

keith-turner merged 2 commits into
apache:2.1from
keith-turner:fix_npe

Conversation

@keith-turner

Copy link
Copy Markdown
Contributor

Changes in #6620 introduced a potential NPE when status is removed from map.

Changes in apache#6620 introduced a potential NPE when status is removed from map.
@keith-turner keith-turner added this to the 2.1.7 milestone Oct 29, 2026
@keith-turner
keith-turner requested a review from dlmarion October 29, 2026 22:01
long fileSize, FileStatus status, Collection<KeyExtent> extents, FileSystem ns,
Cache<String,Long> fileLenCache, CryptoService cs) throws IOException {

final long fileSize = status.getLen();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the potential NPE when a status was removed from a map on failure.

@keith-turner

Copy link
Copy Markdown
Contributor Author

Since these problems only happen with failures, manually modified the code to randomly fail in order to test this change and #6620. Ran BulkIT.testOld() multiple times w/ the random failures happening. Attached the diff used for testing.

6622-test.txt

@keith-turner
keith-turner merged commit 26a2254 into apache:2.1 Oct 30, 2026
9 checks passed
@keith-turner
keith-turner deleted the fix_npe branch October 30, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants