| 62 | } |
| 63 | |
| 64 | void SplitTabletProcedure::PreSplitTabletPhaseHandler(const SplitTabletPhase&) { |
| 65 | if (!split_key_.empty()) { |
| 66 | if ((!tablet_->GetKeyStart().empty() && split_key_ <= tablet_->GetKeyStart()) || |
| 67 | (!tablet_->GetKeyEnd().empty() && split_key_ >= tablet_->GetKeyEnd())) { |
| 68 | PROC_LOG(WARNING) << "invalid split key: " << split_key_ << ", tablet: " << tablet_; |
| 69 | SetNextPhase(SplitTabletPhase::kEofPhase); |
| 70 | return; |
| 71 | } |
| 72 | SetNextPhase(SplitTabletPhase::kUnLoadTablet); |
| 73 | } else if (dispatch_split_key_request_) { |
| 74 | // waiting RPC response |
| 75 | return; |
| 76 | } else { |
| 77 | dispatch_split_key_request_ = true; |
| 78 | ComputeSplitKeyAsync(); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | void SplitTabletProcedure::UnloadTabletPhaseHandler(const SplitTabletPhase&) { |
| 83 | if (!unload_proc_) { |