Skip to content

Commit

Permalink
Merge pull request #25326 from ggevay/compute-set_read_policy-fix
Browse files Browse the repository at this point in the history
Fix `set_read_policy` also in the Compute controller
  • Loading branch information
ggevay authored Feb 16, 2024
2 parents de908fa + 6e4ea7c commit d16a9fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/compute-client/src/controller/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1195,10 +1195,11 @@ where
let old_capability = &collection.implied_capability;
let new_capability = new_policy.frontier(collection.write_frontier.borrow());
if PartialOrder::less_than(old_capability, &new_capability) {
let mut update = ChangeBatch::new();
update.extend(old_capability.iter().map(|t| (t.clone(), -1)));
update.extend(new_capability.iter().map(|t| (t.clone(), 1)));
read_capability_changes.insert(id, update);
let entry = read_capability_changes
.entry(id)
.or_insert_with(ChangeBatch::new);
entry.extend(old_capability.iter().map(|t| (t.clone(), -1)));
entry.extend(new_capability.iter().map(|t| (t.clone(), 1)));
collection.implied_capability = new_capability;
}

Expand Down

0 comments on commit d16a9fc

Please sign in to comment.