Implement a new multi-bucket method for vshard
RFC: https://docs.google.com/document/d/1cSuKG2rI7ydehSjsnmATTEJ3i_d2WOIryVc7j7jw3cc
Algorithm:
-
Group buckets based on router bucket cache and replicate sets.
-
For each replicate set:
a. Transmit presumed replicate-set-affiliated buckets and a function with arguments to the replicate set.
b. Reference the transmitted buckets. If any buckets are missing, remember them.
c. Execute the function and save the result.
-
Return results from 2.c and unfound buckets from 2.b to the router.
-
Collect results from all replicate sets:
a. If there are no unfound buckets, return the result as success.
b. If there were unfound buckets in step 3, search for them and update the router bucket cache through bucket_resolve.
-
For these buckets, go to step 1.
Remember to handle errors and timeouts.