| 151 | } |
| 152 | |
| 153 | Session* DirectSessionGroup::GetSession(int32_t hint_id) { |
| 154 | int32_t id = 0; |
| 155 | Status s = GetServingSessionId(&id, hint_id); |
| 156 | if (!s.ok()) { |
| 157 | LOG(ERROR) << "Get serving session error, use default session[0]"; |
| 158 | return sessions_[0].get(); |
| 159 | } |
| 160 | return sessions_[id].get(); |
| 161 | } |
| 162 | |
| 163 | std::unique_ptr<Session>* DirectSessionGroup::GetSessionPtr(int id) { |
| 164 | if (id < 0 || id >= session_num_) { |
no test coverage detected