Skip to content

Commit

Permalink
Don't run the net_worker when branch is not connectable (#7773)
Browse files Browse the repository at this point in the history
This allows `drop branch`, `create branch ... from ...` to
`ensure_database_not_connected()` correctly, avoiding `failed to ...,
database being accessed by others`.
  • Loading branch information
fantix authored Sep 19, 2024
1 parent f53459f commit ea34f1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions edb/server/net_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ async def _http(tenant: edbtenant.Tenant) -> None:
):
for db in tenant.iter_dbs():
if db.name == defines.EDGEDB_SYSTEM_DB:
# Don't run the net_worker for system database
continue
if not tenant.is_database_connectable(db.name):
# Don't run the net_worker if the database is not
# connectable, e.g. being dropped
continue
json_bytes = await execute.parse_execute_json(
db,
Expand Down

0 comments on commit ea34f1c

Please sign in to comment.