Skip to content

Conversation

@dayshah
Copy link
Contributor

@dayshah dayshah commented Apr 21, 2025

Why are these changes needed?

Some extra moves and linting around task receiver and core worker files. Also reader locking instead of writer locking on the job config setup on every task.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • 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/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: dayshah <dhyey2019@gmail.com>
@dayshah dayshah added the go add ONLY when ready to merge, run all tests label Apr 21, 2025
@dayshah dayshah requested review from edoakes and jjyao April 21, 2025 16:43
Copy link
Collaborator

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

mostly questions for my own understanding

RAY_LOG(INFO).WithField(placement_group_id)
<< "Submitting Placement Group creation to GCS";
const auto status =
auto status =
Copy link
Collaborator

Choose a reason for hiding this comment

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

why drop const?

Copy link
Contributor Author

@dayshah dayshah Apr 21, 2025

Choose a reason for hiding this comment

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

We're returning status, if you return a const you're killing the NRVO (named return value optimization) the compiler would normally do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correction: nrvo isn't guaranteed here and we may be doing an implicit move. And the const removes the implicit move

@dayshah dayshah requested a review from edoakes April 21, 2025 18:42
@edoakes edoakes merged commit d5e173e into ray-project:master Apr 21, 2025
4 checks passed
@dayshah dayshah deleted the task-receive-lint branch April 21, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-backlog go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants