AC isn't robust to non-deterministic actions if newBlocks > 1
Closed this issue · 2 comments
Consider the following situation: an action gets cached. Its outputs are eventually pushed out of the CAS, so it has to be rerun. Everything is fine if the action is deterministic (exactly the outputs get regenerated) or if the AC entry gets updated with the new ActionResult, pointing to the new outputs.
However, when updating the key-location map, bb-storage only allows replacing objects with newer objects, as determined by Location.IsOlder
. It uses the block index, but this isn't reliable when writes are smeared across multiple new blocks. The old object may end up not getting updated, which would cause the action to be rerun every time.
Hey @quval, could you please try the changes in this branch and let me know whether it addresses this issue for you? Thanks!
https://github.com/buildbarn/bb-storage/compare/eschouten/20210428-fix-118
I've updated the number of newBlocks
to 1 for the AC, and this seems to have solved the problem. The patch looks great. Thanks!