File tree Expand file tree Collapse file tree
src/dstack/_internal/server/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -520,7 +520,8 @@ async def delete_fleets(
520520 get_locker (get_db ().dialect_name ).lock_ctx (InstanceModel .__tablename__ , instances_ids ),
521521 ):
522522 # Refetch after lock
523- # TODO lock instances with FOR UPDATE?
523+ # TODO: Lock instances with FOR UPDATE?
524+ # TODO: Do not lock fleet when deleting only instances
524525 res = await session .execute (
525526 select (FleetModel )
526527 .where (
Original file line number Diff line number Diff line change @@ -484,6 +484,7 @@ async def submit_run(
484484
485485 lock , _ = get_locker (get_db ().dialect_name ).get_lockset (lock_namespace )
486486 async with lock :
487+ # FIXME: delete_runs commits, so Postgres lock is released too early.
487488 if run_spec .run_name is None :
488489 run_spec .run_name = await _generate_run_name (
489490 session = session ,
You can’t perform that action at this time.
0 commit comments