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

Initialize client_id_ in ObjectManager constructor #3403

Merged
merged 1 commit into from
Nov 28, 2018
Merged

Initialize client_id_ in ObjectManager constructor #3403

merged 1 commit into from
Nov 28, 2018

Conversation

xutianming
Copy link
Contributor

Initialize client_id_ in ObjectManager constructor that takes user-defined ObjectDirectory.

What do these changes do?

In the ObjectManager constructor that takes user-defined ObjectDirectoryInterface implementation,
client_id_ is not initialized. But several member functions rely on client_id_, such as NotifyDirectoryObjectDeleted and HandleObjectAdded.

This pull request initializes client_id_ by invoking GetLocalClientID of ObjectDirectoryInterface, which retrieves local client id through gcs_client.

Related issue number

No

@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/9603/
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/9604/
Test FAILed.

@xutianming
Copy link
Contributor Author

jenkins retest this please

@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/9607/
Test FAILed.

@robertnishihara
Copy link
Collaborator

@xutianming thanks for submitting this! Were you running into crashes or bugs because of this? If so, what was the scenario that failed?

@xutianming
Copy link
Contributor Author

@xutianming thanks for submitting this! Were you running into crashes or bugs because of this? If so, what was the scenario that failed?

In fact, no. This constructor is currently not invoked.
I was designing a checkpoint feature for object manager and I found the client_id_ member was not always initialized.
There is also a "TODO" comment for this. I think this is a known bug with no consequences for now.

Copy link
Contributor

@elibol elibol left a comment

Choose a reason for hiding this comment

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

@xutianming, thanks for the PR. I think this looks okay as-is.

It's okay to add a method to get the local client id from the object directory, even though it may seem more consistent with the existing design to pass in the client_id via the ObjectManager constructor. We ought to eventually remove the object manager constructor which internally instantiates ObjectDirectory: It will be easier to read and maintain the object manager with a single constructor, and I don't think much would be lost.

@@ -104,6 +104,11 @@ class ObjectDirectoryInterface {
virtual ray::Status ReportObjectRemoved(const ObjectID &object_id,
const ClientID &client_id) = 0;

/// Get Local client id
Copy link
Contributor

Choose a reason for hiding this comment

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

(nit) Please update the documentation to the following: "Get local client id."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@elibol
Copy link
Contributor

elibol commented Nov 28, 2018

jenkins retest this please

@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/9639/
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/9640/
Test FAILed.

@robertnishihara robertnishihara merged commit 139fbf7 into ray-project:master Nov 28, 2018
@robertnishihara
Copy link
Collaborator

Thanks @xutianming!

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.

4 participants