-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'moved_buckets' function would treat as "moved" all the buckets which are not strictly ACTIVE. But that isn't optimal. Also the 'moved_buckets' func would assume that when ref creation is started, by the end of it the buckets stay unchanged. That isn't true. The commit fixes both issues. Firstly, when a bucket is SENDING, returning an error right away isn't good. The router would just keep retrying then, without any progress. The bucket is actually here, it is not moved yet. Better let the storage try to take a ref. Then one of 2 results are possible: - It waits without useless active retries. And then SENDING fails and becomes ACTIVE. Ref is taken, all good. - It waits without useless active retries. SENDING turns into SENT. Ref is taken for the other buckets, and this one is reported as moved. Secondly, after a ref is taken, the not-moved buckets could become moved. Need to re-check them before returning the ref. Luckily, the storage can use bucket_generation to avoid this double-check when nothing changed in _bucket. NO_DOC=bugfix
- Loading branch information
Showing
3 changed files
with
209 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters