mirror of
https://github.com/rustfs/rustfs.git
synced 2026-11-30 04:39:49 +00:00
test(scanner): fence stale prefix fills during replacement
Signed-off-by: overtrue <anzhengchao@gmail.com>
This commit is contained in:
@@ -376,6 +376,8 @@ mod tests {
|
||||
let PrefixUsageLookup::Compute(new) = lookup_or_reserve(&key) else {
|
||||
panic!("expected replacement")
|
||||
};
|
||||
// A late old result must not claim the replacement's still-computing slot.
|
||||
store_cached(&key, &old, std::sync::Arc::new(response("alpha")));
|
||||
let expected = std::sync::Arc::new(response("alpha"));
|
||||
store_cached(&key, &new, expected.clone());
|
||||
store_cached(&key, &old, std::sync::Arc::new(response("alpha")));
|
||||
|
||||
Reference in New Issue
Block a user