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

[core] Split object manager into small C++ targets #50885

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Feb 25, 2025

Why are these changes needed?

Related issue number

Closes #50882

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: kaihsun <kaihsun@anyscale.com>
Signed-off-by: kaihsun <kaihsun@anyscale.com>
@kevin85421 kevin85421 added the go add ONLY when ready to merge, run all tests label Feb 25, 2025
Signed-off-by: kaihsun <kaihsun@anyscale.com>
Signed-off-by: kaihsun <kaihsun@anyscale.com>
@kevin85421 kevin85421 marked this pull request as ready for review February 25, 2025 19:08
hdrs = [
"src/ray/object_manager/common.h",
],
deps = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Please cleanup the dependency as well, I don't think we need all common deps.


ray_cc_library(
name = "object_manager_common",
srcs = [
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

srcs = ["src/ray/object_manager/common.cc"],
hdrs = ["src/ray/object_manager/common.h"],

Copy link
Contributor

Choose a reason for hiding this comment

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

Same below.

"src/ray/object_manager/chunk_object_reader.h",
],
deps = [
":spilled_object_reader",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add logging dependency as well.

"src/ray/object_manager/spilled_object_reader.h",
],
deps = [
":object_reader",
Copy link
Contributor

Choose a reason for hiding this comment

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

More dependencies are expected, including absl optional, common pb, logging.

"src/ray/object_manager/object_reader.h",
],
deps = [
":grpc_common_lib",
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think all dependencies are required, please only include least necessary ones.

"src/ray/object_manager/ownership_based_object_directory.h",
],
deps = [
":gcs_client_lib",
Copy link
Contributor

Choose a reason for hiding this comment

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

A few more deps should be included (include what you use).

Copy link
Contributor

Choose a reason for hiding this comment

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

I also see opportunities to forward declare.

  • instrumented_io_context
  • GcsClient
  • SubscriberInterface

Could be forward declared, in terms of ROI, I would suggest try GcsClient

":object_manager_rpc",
":plasma_store_server_lib",
"//src/ray/util:counter_map",
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, please add all required dependencies.

":gcs",
"//src/ray/common:id",
"//src/ray/common:ray_config",
":stats_metric",
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Also a nit, dependency order should be
(1) local dependencies first (targets under the same folder)
(2) repo dependencies
(3) external dependencies

Copy link
Contributor

Choose a reason for hiding this comment

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

A few dependencies missing here, like absl hash map and set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Split object manager into smaller C++ targets
2 participants