Skip to content

Commit 9708e57

Browse files
tanjialiangfacebook-github-bot
authored andcommitted
Fix reclaim failure logging in HashProbe (facebookincubator#10609)
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
1 parent 1b2ffba commit 9708e57

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

velox/exec/HashProbe.cpp

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,13 @@ void HashProbe::reclaim(
15951595
FB_LOG_EVERY_MS(WARNING, 1'000)
15961596
<< "Can't reclaim from hash probe operator, state_["
15971597
<< ProbeOperatorState(state_) << "], nonReclaimableSection_["
1598-
<< nonReclaimableSection_ << "], " << pool()->name()
1598+
<< nonReclaimableSection_ << "], inputSpiller_["
1599+
<< (inputSpiller_ == nullptr ? "nullptr" : "initialized")
1600+
<< "], table_[" << (table_ == nullptr ? "nullptr" : "initialized")
1601+
<< "], table_ numDistinct["
1602+
<< (table_ == nullptr ? "nullptr"
1603+
: std::to_string(table_->numDistinct()))
1604+
<< "], " << pool()->name()
15991605
<< ", usage: " << succinctBytes(pool()->usedBytes())
16001606
<< ", node pool reservation: "
16011607
<< succinctBytes(pool()->parent()->reservedBytes());
@@ -1612,13 +1618,22 @@ void HashProbe::reclaim(
16121618
if (probeOp->nonReclaimableState()) {
16131619
RECORD_METRIC_VALUE(kMetricMemoryNonReclaimableCount);
16141620
++stats.numNonReclaimableAttempts;
1621+
const auto* peerPool = probeOp->pool();
16151622
FB_LOG_EVERY_MS(WARNING, 1'000)
16161623
<< "Can't reclaim from hash probe operator, state_["
16171624
<< ProbeOperatorState(probeOp->state_) << "], nonReclaimableSection_["
1618-
<< probeOp->nonReclaimableSection_ << "], " << probeOp->pool()->name()
1619-
<< ", usage: " << succinctBytes(pool()->usedBytes())
1625+
<< probeOp->nonReclaimableSection_ << "], inputSpiller_["
1626+
<< (probeOp->inputSpiller_ == nullptr ? "nullptr" : "initialized")
1627+
<< "], table_["
1628+
<< (probeOp->table_ == nullptr ? "nullptr" : "initialized")
1629+
<< "], table_ numDistinct["
1630+
<< (probeOp->table_ == nullptr
1631+
? "nullptr"
1632+
: std::to_string(probeOp->table_->numDistinct()))
1633+
<< "], " << peerPool->name()
1634+
<< ", usage: " << succinctBytes(peerPool->usedBytes())
16201635
<< ", node pool reservation: "
1621-
<< succinctBytes(pool()->parent()->reservedBytes());
1636+
<< succinctBytes(peerPool->parent()->reservedBytes());
16221637
return;
16231638
}
16241639
hasMoreProbeInput |= !probeOp->noMoreSpillInput_;

0 commit comments

Comments
 (0)