-
Notifications
You must be signed in to change notification settings - Fork 6k
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] [7/N] Cleanup gcs server shared pointer #49089
[core] [7/N] Cleanup gcs server shared pointer #49089
Conversation
@@ -231,7 +231,7 @@ class GcsServer { | |||
/// The cluster resource scheduler. | |||
std::shared_ptr<ClusterResourceScheduler> cluster_resource_scheduler_; | |||
/// The cluster task manager. | |||
std::shared_ptr<ClusterTaskManager> cluster_task_manager_; | |||
std::unique_ptr<ClusterTaskManager> cluster_task_manager_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cluster task manager depends on cluster resource manager, so defined later.
156e222
to
75a48f9
Compare
std::shared_ptr<ClusterTaskManager> cluster_task_manager_; | ||
std::unique_ptr<ClusterTaskManager> cluster_task_manager_; | ||
/// The gcs resource manager. | ||
std::unique_ptr<GcsResourceManager> gcs_resource_manager_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource manager depends on cluster resource manager, so defined later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change those into comments. I'm still worried people will move things around without realizing there is order requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, updated.
Signed-off-by: hjiang <[email protected]>
75a48f9
to
ef27439
Compare
std::shared_ptr<ClusterTaskManager> cluster_task_manager_; | ||
std::unique_ptr<ClusterTaskManager> cluster_task_manager_; | ||
/// The gcs resource manager. | ||
std::unique_ptr<GcsResourceManager> gcs_resource_manager_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change those into comments. I'm still worried people will move things around without realizing there is order requirements.
Signed-off-by: hjiang <[email protected]>
Signed-off-by: hjiang <[email protected]>
Cleanup shared pointer and use unique pointer for clear memory ownership and less error prune. --------- Signed-off-by: hjiang <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Cleanup shared pointer and use unique pointer for clear memory ownership and less error prune.
Previous PRs: