Skip to content

Commit 2c6f777

Browse files
committed
rgw/rados: add concurrent io algorithms for sharded data
cls/rgw provides the base class CLSRGWConcurrentIO as a swiss army knife for bucket index operations that visit every shard object. while it uses asynchronous librados requests to perform the io, it blocks on a condition variable when waiting for the AioCompletions. for use in coroutines, we need a version of this that suspends instead of blocking. and to support both stackful and stackless coroutines, we want a fully-generic async inferface templated on CompletionToken. while the CLSRGWConcurrentIO algorithm works for all current uses (reads and writes, with/without retries, with/without cleanup), i chose to break this into 3 algorithms with well-defined semantics: 1. reads: to produce a successful result, all shard operations must succeed. so any shard's failure causes the rest to be cancelled or skipped. supports retries for ListBucket (RGWBIAdvanceAndRetryError). 2. writes: even if some shards fail, we still want to visit every shard before returning the error. supports retries for log trimming operations (repeat until ENODATA). 3. revertible writes: similar to reads, requires all shard operations to succeed. on any failure, the side effects of any successful writes must be reverted before returning. only used by IndexInit (any created shards are removed on failure). each algorithm provides a pure virtual base class that must be implemented for each type of operation, similar to how existing operations inherit from CLSRGWConcurrentIO. Signed-off-by: Casey Bodley <[email protected]>
1 parent 76302ac commit 2c6f777

File tree

3 files changed

+2712
-0
lines changed

3 files changed

+2712
-0
lines changed

0 commit comments

Comments
 (0)