apache / apache/incubator-pegasus

Bug(java client): When using batch, a null pointer exception may occur

Open Beginner friendly
#2,152 0 comments 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
C++
Stars
2.1k
Forks
328
PR merge metrics
No merged PRs in 30d

Description

## Bug Report

1. What did you do?
![小米办公20241126-105239](https://github.com/user-attachments/assets/525500aa-6e72-4de5-b254-0a267982aac7)
in function "commitWaitAllComplete", a null pointer execption occur.

2. What did you see instead?
https://github.com/apache/incubator-pegasus/blob/f8de6dabd2bf96a8eafa6c23136ba1776540556d/java-client/src/main/java/org/apache/pegasus/client/FutureGroup.java#L115-L118
Add a judge which judge the fu.cause() is null before using it.

Contributor guide

Open the contributing guide

Research direction

Start in java-client/src/main/java/org/apache/pegasus/client/FutureGroup.java at lines 115-118, within commitWaitAllComplete. Inspect the use of fu.cause() and verify the batch completion path handles a null cause without throwing a NullPointerException; done means commitWaitAllComplete completes safely in that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.