Improve shard drain logic to make double-release safe
3 files changed