From 23ecd8d3456701380ce48b528eb2ac810a7a8976 Mon Sep 17 00:00:00 2001 From: MaojiaSheng Date: Tue, 7 Apr 2026 12:03:36 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(session):=20add=20timeout=20to=20?= =?UTF-8?q?=5Fwait=5Ffor=5Fprevious=5Farchive=5Fdone=20to=20preve=E2=80=A6?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit dc15daf872381e5a7a1ce95efee4cd890693207e. --- openviking/session/session.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/openviking/session/session.py b/openviking/session/session.py index 9e842ea0a79..e3a3d90fc03 100644 --- a/openviking/session/session.py +++ b/openviking/session/session.py @@ -29,7 +29,6 @@ logger = get_logger(__name__) _ARCHIVE_WAIT_POLL_SECONDS = 0.1 -_ARCHIVE_WAIT_TIMEOUT_SECONDS = 300.0 # 5 minutes max wait for previous archive @dataclass @@ -1043,18 +1042,11 @@ def _archive_index_from_uri(archive_uri: str) -> int: return int(match.group(1)) async def _wait_for_previous_archive_done(self, archive_index: int) -> bool: - """Wait until the previous archive is done, or report dependency failure. - - Returns True if the previous archive completed successfully, False if it - failed or timed out. A timeout is treated as a failure so that the - current archive does not hang indefinitely when the previous archive's - Phase 2 crashed without writing either .done or .failed.json. - """ + """Wait until the previous archive is done, or report dependency failure.""" if archive_index <= 1 or not self._viking_fs: return True previous_archive_uri = f"{self._session_uri}/history/archive_{archive_index - 1:03d}" - deadline = asyncio.get_event_loop().time() + _ARCHIVE_WAIT_TIMEOUT_SECONDS while True: try: await self._viking_fs.read_file(f"{previous_archive_uri}/.done", ctx=self.ctx) @@ -1071,13 +1063,6 @@ async def _wait_for_previous_archive_done(self, archive_index: int) -> bool: except Exception: pass - if asyncio.get_event_loop().time() >= deadline: - logger.error( - f"Timed out waiting for previous archive archive_{archive_index - 1:03d} " - f"after {_ARCHIVE_WAIT_TIMEOUT_SECONDS}s — treating as failed" - ) - return False - await asyncio.sleep(_ARCHIVE_WAIT_POLL_SECONDS) async def _merge_and_save_commit_meta(