Files
AFFiNE/crates
DarkSky 31df4f3917 fix(test-db-harness): converge concurrent shared container starts and require owners for removal
- ensure_shared: a caller that wins the start returns its container as
  soon as its port is published; a caller that loses the race for the
  name waits with short backoff until the winner's container runs. The
  10 s window starts after the caller's own first lookup or start, so
  pulling the image is not counted, and a last lookup runs before giving
  up. A stopped leftover of ours is removed without force and started
  again; a paused or unknown-state shared container is kept and
  reported, since it may hold other runs' databases.
- remove_owned takes a required, non-empty owner run and removes only
  containers labeled affine.test.shared=false, so the shared container
  and containers without the shared label are always refused. The
  owner-less Container::remove is gone; drop passes this run's id.
- Tests: eight callers cold-starting one fresh shared container converge
  on one container and port; a paused shared container is reported and
  kept; every container state maps to its action; empty owners and
  containers missing the shared label are refused.
2026-11-23 13:58:04 +09:00
..