| 156 | } |
| 157 | |
| 158 | void CheckpointSender :: SendCheckpoint() |
| 159 | { |
| 160 | int ret = -1; |
| 161 | for (int i = 0; i < 2; i++) |
| 162 | { |
| 163 | ret = m_poLearner->SendCheckpointBegin( |
| 164 | m_iSendNodeID, m_llUUID, m_llSequence, |
| 165 | m_poSMFac->GetCheckpointInstanceID(m_poConfig->GetMyGroupIdx())); |
| 166 | if (ret != 0) |
| 167 | { |
| 168 | PLGErr("SendCheckpointBegin fail, ret %d", ret); |
| 169 | return; |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | BP->GetCheckpointBP()->SendCheckpointBegin(); |
| 174 | |
| 175 | m_llSequence++; |
| 176 | |
| 177 | std::vector<StateMachine *> vecSMList = m_poSMFac->GetSMList(); |
| 178 | for (auto & poSM : vecSMList) |
| 179 | { |
| 180 | ret = SendCheckpointFofaSM(poSM); |
| 181 | if (ret != 0) |
| 182 | { |
| 183 | return; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | ret = m_poLearner->SendCheckpointEnd( |
| 188 | m_iSendNodeID, m_llUUID, m_llSequence, |
| 189 | m_poSMFac->GetCheckpointInstanceID(m_poConfig->GetMyGroupIdx())); |
| 190 | if (ret != 0) |
| 191 | { |
| 192 | PLGErr("SendCheckpointEnd fail, sequence %lu ret %d", m_llSequence, ret); |
| 193 | } |
| 194 | |
| 195 | BP->GetCheckpointBP()->SendCheckpointEnd(); |
| 196 | } |
| 197 | |
| 198 | int CheckpointSender :: SendCheckpointFofaSM(StateMachine * poSM) |
| 199 | { |
nothing calls this directly
no test coverage detected