mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
fix: also catch TimeoutExpired in P3018 rollback handler
_roll_back_migration uses subprocess.run with timeout=60, so it can raise subprocess.TimeoutExpired in addition to CalledProcessError. Without catching this, a slow database during rollback would escape the handler and bypass _resolve_specific_migration — the same class of bug. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
591288bd14
commit
afa904e97a
1 changed files with 1 additions and 1 deletions
|
|
@ -521,7 +521,7 @@ class ProxyExtrasDBManager:
|
|||
ProxyExtrasDBManager._roll_back_migration(
|
||||
migration_name
|
||||
)
|
||||
except subprocess.CalledProcessError as rollback_err:
|
||||
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as rollback_err:
|
||||
logger.warning(
|
||||
f"Failed to roll back migration {migration_name}: {rollback_err}. "
|
||||
f"It may already be in a rolled-back state."
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue