Skip to content

[core] Refactor task arguments and attach owner address#9152

Merged
stephanie-wang merged 25 commits intoray-project:masterfrom
stephanie-wang:refactor-task-arg
Jul 7, 2020
Merged

[core] Refactor task arguments and attach owner address#9152
stephanie-wang merged 25 commits intoray-project:masterfrom
stephanie-wang:refactor-task-arg

Conversation

@stephanie-wang
Copy link
Copy Markdown
Contributor

@stephanie-wang stephanie-wang commented Jun 25, 2020

Why are these changes needed?

The owner address will be needed for ObjectIDs passed to the raylet for several reasons:

  1. To contact the owner and check if a required object cannot be fetched, due to some failure.
  2. To contact the owner for an object's locations, once the object directory is moved into the owner.

The owner address is available for ObjectIDs that the process has a reference to, but not for task arguments that are passed by reference. This PR attaches the owner's address to all arguments passed by reference in the task spec.

This PR also contains two refactors:

  1. Changes TaskArg to a virtual class, implemented by either TaskArgByReference or TaskArgByValue.
  2. Changes TaskArg to only contain one ID (as far as I could tell, the comment about it needing to contain multiple IDs is very outdated and there is no current plan to support multiple IDs in a single argument).

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/latest/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failure rates at https://ray-travis-tracker.herokuapp.com/.
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested (please justify below)

@AmplabJenkins
Copy link
Copy Markdown

Can one of the admins verify this patch?

@stephanie-wang stephanie-wang changed the title [core] Refactor task arguments and attach owner address [WIP][core] Refactor task arguments and attach owner address Jun 25, 2020
@stephanie-wang stephanie-wang changed the title [WIP][core] Refactor task arguments and attach owner address [core] Refactor task arguments and attach owner address Jun 26, 2020
@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

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

LGTM

// ObjectID that the worker has a reference to.
bytes object_id = 1;
// The address of the object's owner.
Address owner_address = 3;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is this 3?

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@AmplabJenkins
Copy link
Copy Markdown

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

@stephanie-wang stephanie-wang merged commit b42d6a1 into ray-project:master Jul 7, 2020
@stephanie-wang stephanie-wang deleted the refactor-task-arg branch July 7, 2020 04:25
@AmplabJenkins
Copy link
Copy Markdown

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

@chaokunyang chaokunyang mentioned this pull request Jul 28, 2020
6 tasks
lixin-wei added a commit to lixin-wei/ray that referenced this pull request Jul 30, 2020
lixin-wei added a commit to lixin-wei/ray that referenced this pull request Aug 5, 2020
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