Skip to content

Commit

Permalink
no gtest code in production code
Browse files Browse the repository at this point in the history
Signed-off-by: dentiny <dentinyhao@gmail.com>
  • Loading branch information
dentiny committed Dec 19, 2024
1 parent 53d2145 commit a994c82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/ray/raylet/local_object_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ namespace ray {
namespace raylet {

/// The default number of retries when spilled object deletion failed.
const int64_t kDefaultSpilledObjectDeleteRetries = 3;
inline constexpr int64_t kDefaultSpilledObjectDeleteRetries = 3;

/// This class implements memory management for primary objects, objects that
/// have been freed, and objects that have been spilled.
class LocalObjectManager {
public:
LocalObjectManager(
const NodeID &node_id,
NodeID node_id,
std::string self_node_address,
int self_node_port,
instrumented_io_context &io_service,
Expand Down
13 changes: 6 additions & 7 deletions src/ray/raylet/local_task_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool IsCPUOrPlacementGroupCPUResource(ResourceID resource_id) {
}

LocalTaskManager::LocalTaskManager(
const NodeID &self_node_id,
NodeID self_node_id,
ClusterResourceScheduler &cluster_resource_scheduler,
TaskDependencyManagerInterface &task_dependency_manager,
std::function<bool(const WorkerID &, const NodeID &)> is_owner_alive,
Expand All @@ -55,27 +55,26 @@ LocalTaskManager::LocalTaskManager(
size_t max_pinned_task_arguments_bytes,
std::function<int64_t(void)> get_time_ms,
int64_t sched_cls_cap_interval_ms)
: self_node_id_(self_node_id),
: self_node_id_(std::move(self_node_id)),
cluster_resource_scheduler_(cluster_resource_scheduler),
task_dependency_manager_(task_dependency_manager),
is_owner_alive_(is_owner_alive),
get_node_info_(get_node_info),
get_node_info_(std::move(get_node_info)),
max_resource_shapes_per_load_report_(
RayConfig::instance().max_resource_shapes_per_load_report()),
worker_pool_(worker_pool),
leased_workers_(leased_workers),
get_task_arguments_(get_task_arguments),
get_task_arguments_(std::move(get_task_arguments)),
max_pinned_task_arguments_bytes_(max_pinned_task_arguments_bytes),
get_time_ms_(get_time_ms),
get_time_ms_(std::move(get_time_ms)),
sched_cls_cap_enabled_(RayConfig::instance().worker_cap_enabled()),
sched_cls_cap_interval_ms_(sched_cls_cap_interval_ms),
sched_cls_cap_max_ms_(RayConfig::instance().worker_cap_max_backoff_delay_ms()) {}

void LocalTaskManager::QueueAndScheduleTask(std::shared_ptr<internal::Work> work) {
// If the local node is draining, the cluster task manager will
// guarantee that the local node is not selected for scheduling.
ASSERT_FALSE(
cluster_resource_scheduler_.GetLocalResourceManager().IsLocalNodeDraining());
RAY_CHECK(!cluster_resource_scheduler_.GetLocalResourceManager().IsLocalNodeDraining());
WaitForTaskArgsRequests(std::move(work));
ScheduleAndDispatchTasks();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ray/raylet/local_task_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class LocalTaskManager : public ILocalTaskManager {
/// scheduling class. If set to 0, there is no
/// cap. If it's a large number, the cap is hard.
LocalTaskManager(
const NodeID &self_node_id,
NodeID self_node_id,
ClusterResourceScheduler &cluster_resource_scheduler,
TaskDependencyManagerInterface &task_dependency_manager,
std::function<bool(const WorkerID &, const NodeID &)> is_owner_alive,
Expand Down

0 comments on commit a994c82

Please sign in to comment.