bugfix: support per-fork disagg pd port for fork master.#1220
bugfix: support per-fork disagg pd port for fork master.#1220Clement-Wang26 wants to merge 1 commit intojd-opensource:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces an optional disagg_pd_port configuration across the API service, master instances, and schedulers, enabling more flexible port assignment during master forking. The changes include updates to the protobuf definitions, options handling, and RPC server startup logic to propagate this port. Technical feedback identifies a likely compilation error in the logging code within disagg_pd_scheduler.cpp and pd_ooc_scheduler.cpp, where to_string() is called on an InstanceRole enum, which typically does not possess such a member method in C++.
| << (options_.instance_role().has_value() | ||
| ? options_.instance_role().value().to_string() | ||
| : "unknown") |
There was a problem hiding this comment.
The instance_role() method in ContinuousScheduler::Options returns an std::optional<InstanceRole>. While the ternary operator correctly checks has_value(), the InstanceRole type itself (likely an enum class based on the style guide) does not have a to_string() member method. This will cause a compilation error. You should use a helper function or a global to_string overload if available, or ensure InstanceRole is a class that provides this method.
| << (options_.instance_role().has_value() | ||
| ? options_.instance_role().value().to_string() | ||
| : "unknown") |
There was a problem hiding this comment.
The instance_role() method in ContinuousScheduler::Options returns an std::optional<InstanceRole>. While the ternary operator correctly checks has_value(), the InstanceRole type itself (likely an enum class based on the style guide) does not have a to_string() member method. This will cause a compilation error. You should use a helper function or a global to_string overload if available, or ensure InstanceRole is a class that provides this method.
No description provided.