fix(quota): reconcile matching scanner usage (#6521)

This commit is contained in:
Zhengchao An
2026-08-24 19:33:53 +08:00
committed by GitHub
parent de9e8faa27
commit 6f14a79089
+7
View File
@@ -2145,6 +2145,13 @@ async fn replace_bucket_usage_memory_from_info_if_generation(data_usage_info: &D
candidate.insert(preserved);
continue;
}
if existing.authoritative && existing.dirty && bucket_usage_counts_match(&existing.usage, &candidate.get().usage)
{
// Matching core counts make the complete scanner snapshot
// equivalent for every field tracked by process-local
// mutations, even when its timestamp predates the request.
continue;
}
if existing.authoritative && existing.usage_updated_at > usage_updated_at {
candidate.insert(existing.clone());
continue;