void MultiPlanRunner::saveState() { if (_failure || _killed) { return; } if (NULL != _bestPlan) { _bestPlan->saveState(); } else { allPlansSaveState(); } }
void MultiPlanStage::prepareToYield() { if (_failure) return; // this logic is from multi_plan_runner // but does it really make sense to operate on // the _bestPlan if we've switched to the backup? if (bestPlanChosen()) { _candidates[_bestPlanIdx].root->prepareToYield(); if (hasBackupPlan()) { _candidates[_backupPlanIdx].root->prepareToYield(); } } else { allPlansSaveState(); } }