Skip to content

Commit 8e30ee1

Browse files
tianyi-geisrabbani
andauthored
[core] early exit spill if spilling config is empty (#53193)
Even though there's no spilling happening, ray still logs "trying to spill." Add an early exit to avoid confusing logs. Closes #53086 Signed-off-by: tianyi-ge <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]>
1 parent d90e270 commit 8e30ee1

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/ray/raylet/node_manager.cc

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,15 @@ ray::Status NodeManager::RegisterGcs() {
434434
[this] { local_object_manager_.FlushFreeObjects(); },
435435
RayConfig::instance().free_objects_period_milliseconds(),
436436
"NodeManager.deadline_timer.flush_free_objects");
437-
periodical_runner_->RunFnPeriodically(
438-
[this] { SpillIfOverPrimaryObjectsThreshold(); },
439-
RayConfig::instance().free_objects_period_milliseconds(),
440-
"NodeManager.deadline_timer.spill_objects_when_over_threshold");
437+
if (RayConfig::instance().object_spilling_config().empty()) {
438+
RAY_LOG(INFO) << "Object spilling is disabled because spilling config is "
439+
<< "unspecified";
440+
} else {
441+
periodical_runner_->RunFnPeriodically(
442+
[this] { SpillIfOverPrimaryObjectsThreshold(); },
443+
RayConfig::instance().free_objects_period_milliseconds(),
444+
"NodeManager.deadline_timer.spill_objects_when_over_threshold");
445+
}
441446
}
442447
/// If periodic asio stats print is enabled, it will print it.
443448
const auto event_stats_print_interval_ms =
@@ -2384,6 +2389,10 @@ void NodeManager::FinishAssignedActorCreationTask(WorkerInterface &worker,
23842389
}
23852390

23862391
void NodeManager::SpillIfOverPrimaryObjectsThreshold() {
2392+
if (RayConfig::instance().object_spilling_config().empty()) {
2393+
RAY_LOG(INFO) << "Object spilling is disabled because spilling config is unspecified";
2394+
return;
2395+
}
23872396
// Trigger object spilling if current usage is above the specified threshold.
23882397
const float allocated_percentage =
23892398
static_cast<float>(local_object_manager_.GetPrimaryBytes()) /

0 commit comments

Comments
 (0)