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

[VL] Enhance spill log readability #7300

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,23 @@ int64_t WholeStageResultIterator::spillFixedSize(int64_t size) {
// As of now, non-zero running threads usually happens when:
// 1. Task A spills task B;
// 2. Task A trys to grow buffers created by task B, during which spill is requested on task A again;
VLOG(2) << logPrefix << "Spill is requested on a task " << task_->taskId()
<< " that has non-zero running threads, which is not currently supported. Skipping.";
LOG(INFO) << fmt::format(
"{} spill is requested on a task {} that has non-zero running threads, which is not currently supported. Skipping.",
logPrefix,
task_->taskId());
return shrunken;
}
int64_t remaining = size - shrunken;
LOG(INFO) << logPrefix << "Trying to request spill for " << remaining << " bytes...";
auto* mm = memoryManager_->getMemoryManager();
LOG(INFO) << fmt::format("{} trying to request spill for {}.", logPrefix, velox::succinctBytes(remaining));
auto mm = memoryManager_->getMemoryManager();
uint64_t spilledOut = mm->arbitrator()->shrinkCapacity(remaining); // this conducts spill
LOG(INFO) << logPrefix << "Successfully spilled out " << spilledOut << " bytes.";
uint64_t total = shrunken + spilledOut;
VLOG(2) << logPrefix << "Successfully reclaimed total " << total << " bytes.";
LOG(INFO) << fmt::format(
"{} successfully reclaimed total {} with shrunken {} and spilled {}.",
logPrefix,
velox::succinctBytes(total),
velox::succinctBytes(shrunken),
velox::succinctBytes(spilledOut));
return total;
}
LOG(WARNING) << "Spill-to-disk was disabled since " << kSpillStrategy << " was not configured.";
Expand Down
Loading