We used to only check if the move operation happened if we retried.
With multiple regions which can retry independently, detecting if we
retried from client becomes unreliable.
In this change we relax the idempotency check to succeed if the requested
operation succeeded and the creation time of the new edge is "close enough"
to current time. Currently close enough is 1 minute.
Previously if 2 clients tried to move the same file to the same target
concurrently, one would succeed and the other would get edge not found.
With this change, both may succeed if they are close enough in time.
With reduced span cache time the block service cache
is no longer needed. We also don't need to fetch
changed block services from registry as we'll get
it as part of span fetches.
* kmod: minor write path fixes
We didn't actually see these happen in production.
Fix 1:
From kernel code it looks like copy_page_from_iter can not return 0 in
normal cases but our code should still cover the case if this changes in
the future.
Fix 2:
-ENOMEM was other error where we could write things partially in which
case we would not return written and we would end up at wrong offset.
It's simpler to just return written if we managed to write anything
and surface the error on subsequent call in which we will fail early.
* kmod: add BUG_ON for unexpected span pages
This is in preparation with a deeper refactor of reading from Go
in general. The big difference that we have now which we did not
have before is that we now have CRCs for every single page.
Specifically:
* Extend tables so that they won't wrap around wrongly for big sizes
(we would never hit this since our blocks are at most a few MBs
big).
* Use CRC instructions to compute remainders.