MCPcopy Create free account
hub / github.com/bytedance/bolt / prepareForSpillRestore

Method prepareForSpillRestore

bolt/exec/HashProbe.cpp:498–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496}
497
498void HashProbe::prepareForSpillRestore() {
499 checkRunning();
500 BOLT_CHECK(spillEnabled());
501 BOLT_CHECK(hasMoreSpillData());
502
503 // Reset the internal states which are relevant to the previous probe run.
504 noMoreSpillInput_ = false;
505 table_.reset();
506 spiller_.reset();
507 if (!reuseSpillReader_) {
508 spillInputReader_.reset();
509 }
510 spillInputPartitionIds_.clear();
511 lastProbeIterator_.reset();
512
513 BOLT_CHECK(promises_.empty() || lastProber_);
514 if (!lastProber_) {
515 return;
516 }
517 lastProber_ = false;
518 // Notify the hash build operators to build the next hash table.
519 joinBridge_->probeFinished();
520
521 // Wake up the peer hash probe operators to wait for table build.
522 auto promises = std::move(promises_);
523 for (auto& promise : promises) {
524 promise.setValue();
525 }
526}
527
528void HashProbe::addSpillInput() {
529 checkRunning();

Callers

nothing calls this directly

Calls 5

probeFinishedMethod · 0.80
resetMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected