Skip to content

Commit 1682d4c

Browse files
authored
Revert "fix(session): add timeout to _wait_for_previous_archive_done to preve…" (#1265)
This reverts commit dc15daf.
1 parent 8019564 commit 1682d4c

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

openviking/session/session.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
logger = get_logger(__name__)
3030

3131
_ARCHIVE_WAIT_POLL_SECONDS = 0.1
32-
_ARCHIVE_WAIT_TIMEOUT_SECONDS = 300.0 # 5 minutes max wait for previous archive
3332

3433

3534
@dataclass
@@ -1043,18 +1042,11 @@ def _archive_index_from_uri(archive_uri: str) -> int:
10431042
return int(match.group(1))
10441043

10451044
async def _wait_for_previous_archive_done(self, archive_index: int) -> bool:
1046-
"""Wait until the previous archive is done, or report dependency failure.
1047-
1048-
Returns True if the previous archive completed successfully, False if it
1049-
failed or timed out. A timeout is treated as a failure so that the
1050-
current archive does not hang indefinitely when the previous archive's
1051-
Phase 2 crashed without writing either .done or .failed.json.
1052-
"""
1045+
"""Wait until the previous archive is done, or report dependency failure."""
10531046
if archive_index <= 1 or not self._viking_fs:
10541047
return True
10551048

10561049
previous_archive_uri = f"{self._session_uri}/history/archive_{archive_index - 1:03d}"
1057-
deadline = asyncio.get_event_loop().time() + _ARCHIVE_WAIT_TIMEOUT_SECONDS
10581050
while True:
10591051
try:
10601052
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:
10711063
except Exception:
10721064
pass
10731065

1074-
if asyncio.get_event_loop().time() >= deadline:
1075-
logger.error(
1076-
f"Timed out waiting for previous archive archive_{archive_index - 1:03d} "
1077-
f"after {_ARCHIVE_WAIT_TIMEOUT_SECONDS}s — treating as failed"
1078-
)
1079-
return False
1080-
10811066
await asyncio.sleep(_ARCHIVE_WAIT_POLL_SECONDS)
10821067

10831068
async def _merge_and_save_commit_meta(

0 commit comments

Comments
 (0)