• Home
  • Raw
  • Download

Lines Matching refs:session

805   for (ApexSession& session : sessions) {  in ClearSessions()
806 Status status = session.DeleteSession(); in ClearSessions()
895 Status DoRollback(ApexSession& session) { in DoRollback() argument
901 auto st = session.UpdateStateAndCommit(SessionState::ROLLBACK_FAILED); in DoRollback()
902 LOG(DEBUG) << "Marking " << session << " as failed to rollback"; in DoRollback()
904 LOG(WARNING) << "Failed to mark session " << session in DoRollback()
950 Status RollbackStagedSession(ApexSession& session) { in RollbackStagedSession() argument
953 return session.UpdateStateAndCommit(SessionState::ROLLED_BACK); in RollbackStagedSession()
956 Status RollbackActivatedSession(ApexSession& session) { in RollbackActivatedSession() argument
966 session.UpdateStateAndCommit(SessionState::ROLLBACK_IN_PROGRESS); in RollbackActivatedSession()
969 return Status::Fail(StringLog() << "Rollback of session " << session in RollbackActivatedSession()
973 status = DoRollback(session); in RollbackActivatedSession()
975 return Status::Fail(StringLog() << "Rollback of session " << session in RollbackActivatedSession()
979 status = session.UpdateStateAndCommit(SessionState::ROLLED_BACK); in RollbackActivatedSession()
981 LOG(WARNING) << "Failed to mark session " << session in RollbackActivatedSession()
988 Status RollbackSession(ApexSession& session) { in RollbackSession() argument
989 LOG(DEBUG) << "Initializing rollback of " << session; in RollbackSession()
991 switch (session.GetState()) { in RollbackSession()
997 return RollbackStagedSession(session); in RollbackSession()
999 return RollbackActivatedSession(session); in RollbackSession()
1001 return Status::Fail(StringLog() << "Can't restore session " << session in RollbackSession()
1006 Status ResumeRollback(ApexSession& session) { in ResumeRollback() argument
1012 auto rollback_status = DoRollback(session); in ResumeRollback()
1017 auto status = session.UpdateStateAndCommit(SessionState::ROLLED_BACK); in ResumeRollback()
1019 LOG(WARNING) << "Failed to mark session " << session in ResumeRollback()
1109 auto session = ApexSession::GetActiveSession(); in resumeRollbackIfNeeded() local
1110 if (!session.Ok()) { in resumeRollbackIfNeeded()
1111 return session.ErrorStatus(); in resumeRollbackIfNeeded()
1113 if (!session->has_value()) { in resumeRollbackIfNeeded()
1116 if ((**session).GetState() == SessionState::ROLLBACK_IN_PROGRESS) { in resumeRollbackIfNeeded()
1118 return ResumeRollback(**session); in resumeRollbackIfNeeded()
1289 auto& session = session_or_none->value(); in abortActiveSession() local
1290 LOG(DEBUG) << "Aborting active session " << session; in abortActiveSession()
1291 switch (session.GetState()) { in abortActiveSession()
1295 return session.DeleteSession(); in abortActiveSession()
1297 return RollbackActivatedSession(session); in abortActiveSession()
1300 << "Session " << session << " can't be aborted"); in abortActiveSession()
1379 for (auto& session : stagedSessions) { in scanStagedSessionsDirAndStage() local
1380 auto sessionId = session.GetId(); in scanStagedSessionsDirAndStage()
1384 auto st = session.UpdateStateAndCommit(SessionState::ACTIVATION_FAILED); in scanStagedSessionsDirAndStage()
1393 if (session.GetChildSessionIds().empty()) { in scanStagedSessionsDirAndStage()
1397 for (auto childSessionId : session.GetChildSessionIds()) { in scanStagedSessionsDirAndStage()
1453 auto st = session.UpdateStateAndCommit(SessionState::ACTIVATED); in scanStagedSessionsDirAndStage()
1455 LOG(ERROR) << "Failed to mark " << session in scanStagedSessionsDirAndStage()
1617 auto session = ApexSession::GetActiveSession(); in rollbackStagedSessionIfAny() local
1618 if (!session.Ok()) { in rollbackStagedSessionIfAny()
1619 return session.ErrorStatus(); in rollbackStagedSessionIfAny()
1621 if (!session->has_value()) { in rollbackStagedSessionIfAny()
1625 if ((*session)->GetState() == SessionState::STAGED) { in rollbackStagedSessionIfAny()
1626 LOG(INFO) << "Rolling back session " << **session; in rollbackStagedSessionIfAny()
1627 return RollbackStagedSession(**session); in rollbackStagedSessionIfAny()
1629 return Status::Fail(StringLog() << "Can't rollback " << **session in rollbackStagedSessionIfAny()
1634 auto session = ApexSession::GetActiveSession(); in rollbackActiveSession() local
1635 if (!session.Ok()) { in rollbackActiveSession()
1637 << session.ErrorMessage()); in rollbackActiveSession()
1638 } else if (!session->has_value()) { in rollbackActiveSession()
1642 return RollbackSession(*(*session)); in rollbackActiveSession()
1841 auto session = ApexSession::CreateSession(session_id); in submitStagedSession() local
1842 if (!session.Ok()) { in submitStagedSession()
1843 return StatusOr<std::vector<ApexFile>>::MakeError(session.ErrorMessage()); in submitStagedSession()
1845 (*session).SetChildSessionIds(child_session_ids); in submitStagedSession()
1847 (*session).UpdateStateAndCommit(SessionState::VERIFIED); in submitStagedSession()
1856 auto session = ApexSession::GetSession(session_id); in markStagedSessionReady() local
1857 if (!session.Ok()) { in markStagedSessionReady()
1858 return session.ErrorStatus(); in markStagedSessionReady()
1863 auto session_state = (*session).GetState(); in markStagedSessionReady()
1868 return (*session).UpdateStateAndCommit(SessionState::STAGED); in markStagedSessionReady()
1875 auto session = ApexSession::GetSession(session_id); in markStagedSessionSuccessful() local
1876 if (!session.Ok()) { in markStagedSessionSuccessful()
1877 return session.ErrorStatus(); in markStagedSessionSuccessful()
1881 if (session->GetState() == SessionState::SUCCESS) { in markStagedSessionSuccessful()
1883 } else if (session->GetState() == SessionState::ACTIVATED) { in markStagedSessionSuccessful()
1886 return Status::Fail(StringLog() << "Failed to mark session " << *session in markStagedSessionSuccessful()
1890 return session->UpdateStateAndCommit(SessionState::SUCCESS); in markStagedSessionSuccessful()
1892 return Status::Fail(StringLog() << "Session " << *session in markStagedSessionSuccessful()