| 209 | } |
| 210 | |
| 211 | comm::RetCode Scheduler::RawAcquireLock(comm::proto::AcquireLockRequest &req, |
| 212 | comm::proto::AcquireLockResponse &resp) { |
| 213 | lock::LockMasterClient<comm::proto::AcquireLockRequest, comm::proto::AcquireLockResponse> |
| 214 | lock_master_client; |
| 215 | comm::RetCode ret{lock_master_client.ClientCall(req, resp, |
| 216 | bind(&Scheduler::AcquireLock, this, placeholders::_1, placeholders::_2))}; |
| 217 | if (comm::RetCode::RET_OK != ret) { |
| 218 | comm::SchedulerBP::GetThreadInstance()->OnAcquireLockFail(req); |
| 219 | QLErr("SchedulerMasterClient::ClientCall ret %d", as_integer(ret)); |
| 220 | } |
| 221 | |
| 222 | if (comm::RetCode::RET_OK != ret) { |
| 223 | QLErr("Add ret %d", as_integer(ret)); |
| 224 | return ret; |
| 225 | } |
| 226 | |
| 227 | comm::SchedulerBP::GetThreadInstance()->OnAcquireLockSucc(req, resp); |
| 228 | |
| 229 | QLVerb("RawAcquireLock succ"); |
| 230 | |
| 231 | return comm::RetCode::RET_OK; |
| 232 | } |
| 233 | |
| 234 | bool Scheduler::NeedDropMaster() { |
| 235 | return false; |
no test coverage detected