Release readiness probe database transactions
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

This commit is contained in:
tegwick 2026-08-14 14:22:35 +02:00
parent 14b8121c71
commit d4a13275d0
2 changed files with 11 additions and 2 deletions

View file

@ -591,7 +591,12 @@ class PostgresUserEngineStore:
""",
(LATEST_SCHEMA_VERSION,),
)
return cursor.fetchone() is not None
present = cursor.fetchone() is not None
# psycopg starts a transaction even for this readiness SELECT.
# End it immediately so probes cannot retain relation locks that
# block the next replica's idempotent schema migration.
self.connection.rollback()
return present
except Exception:
self.connection.rollback()
return False