Skip to content

Commit

Permalink
doc/rgw: update reshard design regarding 'bucket sync disable'
Browse files Browse the repository at this point in the history
Signed-off-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley committed Nov 10, 2020
1 parent f7d6935 commit e163c87
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/doc/rgw/multisite-reshard.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,19 @@ The distinction between *index layout* and *log layout* is important, because in
* Full sync uses a single bucket-wide listing to fetch all objects.
- Use a cls_lock to prevent different shards from duplicating this work.
* When incremental sync gets to the end of a log shard (i.e. listing the log returns truncated=false):
- If the remote has a newer log generation, flag that shard as 'resharded' in the bucket sync status.
- Once all shards in the current generation reach that 'resharded' state, incremental bucket sync can advance to the next generation.
- If the remote has a newer log generation, flag that shard as 'done' in the bucket sync status.
- Once all shards in the current generation reach that 'done' state, incremental bucket sync can advance to the next generation.
- Use cls_version on the bucket sync status object to detect racing writes from other shards.

### Bucket Sync Disable/Enable

Reframe in terms of log generations, instead of handling SYNCSTOP events with a special Stopped state:

* radosgw-admin bucket sync enable: create a new log generation in the bucket instance metadata
- detect races with reshard: fail if reshard in progress, and write with cls_version to detect race with start of reshard
- if the current log generation is shared with the bucket index layout (BucketLogType::InIndex), the new log generation will point at the same index layout/generation. so the log generation increments, but the index objects keep the same generation
* SYNCSTOP in incremental sync: flag the shard as 'done' and ignore datalog events on that bucket until we see a new generation

### Log Trimming

* Use generation number from sync status to trim the right logs
Expand Down

0 comments on commit e163c87

Please sign in to comment.