| 154 | } |
| 155 | |
| 156 | BlockingReason fromStateToBlockingReason(ProbeOperatorState state) { |
| 157 | switch (state) { |
| 158 | case ProbeOperatorState::kRunning: |
| 159 | [[fallthrough]]; |
| 160 | case ProbeOperatorState::kFinish: |
| 161 | return BlockingReason::kNotBlocked; |
| 162 | case ProbeOperatorState::kWaitForBuild: |
| 163 | return BlockingReason::kWaitForJoinBuild; |
| 164 | case ProbeOperatorState::kWaitForPeers: |
| 165 | return BlockingReason::kWaitForJoinProbe; |
| 166 | default: |
| 167 | BOLT_UNREACHABLE("Unexpected state: ", probeOperatorStateName(state)); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | // Generate partition number set from spill partition id set. |
| 172 | SpillPartitionNumSet toPartitionNumSet( |
no test coverage detected