Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue when waiting an empty list or a null pointer #3632

Merged
merged 4 commits into from
Dec 26, 2018

Conversation

jovany-wang
Copy link
Contributor

What do these changes do?

Before this change, if we wait an empty list or a null pointer, the raylet will crash because of a failure of check(list.size() is not 0).

Related issue number

N/A

@jovany-wang jovany-wang requested a review from raulchen December 25, 2018 07:25
@@ -47,6 +47,13 @@ public RayletClientImpl(String schedulerSockName, UniqueId clientId,
@Override
public <T> WaitResult<T> wait(List<RayObject<T>> waitFor, int numReturns, int
timeoutMs, UniqueId currentTaskId) {
if (waitFor == null) {
throw new NullPointerException();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

use Preconditions.checkNotNull()

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/10379/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/10381/
Test FAILed.

@raulchen
Copy link
Contributor

CI failures should be unrelated, because this PR only touches Java code.

@raulchen raulchen merged commit a971b73 into ray-project:master Dec 26, 2018
@jovany-wang jovany-wang deleted the fix-wait-empty-objs branch January 17, 2019 12:51
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.

3 participants