Skip to content

Commit

Permalink
Fix reclaim failure logging in HashProbe (facebookincubator#10609)
Browse files Browse the repository at this point in the history
Summary:
Corrected the peer pool message. Added informative signals to indicate the current reclaim state of the hash probe operator.

Pull Request resolved: facebookincubator#10609

Reviewed By: kevinwilfong

Differential Revision: D60466607

Pulled By: tanjialiang

fbshipit-source-id: 21c52bd3afe817b482182029eae3ec6d6af0450f
  • Loading branch information
tanjialiang authored and facebook-github-bot committed Aug 1, 2024
1 parent 1b2ffba commit 9708e57
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions velox/exec/HashProbe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,13 @@ void HashProbe::reclaim(
FB_LOG_EVERY_MS(WARNING, 1'000)
<< "Can't reclaim from hash probe operator, state_["
<< ProbeOperatorState(state_) << "], nonReclaimableSection_["
<< nonReclaimableSection_ << "], " << pool()->name()
<< nonReclaimableSection_ << "], inputSpiller_["
<< (inputSpiller_ == nullptr ? "nullptr" : "initialized")
<< "], table_[" << (table_ == nullptr ? "nullptr" : "initialized")
<< "], table_ numDistinct["
<< (table_ == nullptr ? "nullptr"
: std::to_string(table_->numDistinct()))
<< "], " << pool()->name()
<< ", usage: " << succinctBytes(pool()->usedBytes())
<< ", node pool reservation: "
<< succinctBytes(pool()->parent()->reservedBytes());
Expand All @@ -1612,13 +1618,22 @@ void HashProbe::reclaim(
if (probeOp->nonReclaimableState()) {
RECORD_METRIC_VALUE(kMetricMemoryNonReclaimableCount);
++stats.numNonReclaimableAttempts;
const auto* peerPool = probeOp->pool();
FB_LOG_EVERY_MS(WARNING, 1'000)
<< "Can't reclaim from hash probe operator, state_["
<< ProbeOperatorState(probeOp->state_) << "], nonReclaimableSection_["
<< probeOp->nonReclaimableSection_ << "], " << probeOp->pool()->name()
<< ", usage: " << succinctBytes(pool()->usedBytes())
<< probeOp->nonReclaimableSection_ << "], inputSpiller_["
<< (probeOp->inputSpiller_ == nullptr ? "nullptr" : "initialized")
<< "], table_["
<< (probeOp->table_ == nullptr ? "nullptr" : "initialized")
<< "], table_ numDistinct["
<< (probeOp->table_ == nullptr
? "nullptr"
: std::to_string(probeOp->table_->numDistinct()))
<< "], " << peerPool->name()
<< ", usage: " << succinctBytes(peerPool->usedBytes())
<< ", node pool reservation: "
<< succinctBytes(pool()->parent()->reservedBytes());
<< succinctBytes(peerPool->parent()->reservedBytes());
return;
}
hasMoreProbeInput |= !probeOp->noMoreSpillInput_;
Expand Down

0 comments on commit 9708e57

Please sign in to comment.