New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgw: split logs for metadata sync by period #7699
rgw: split logs for metadata sync by period #7699
Conversation
and call it again instead of just draining at the end Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
similar to what we do with the full md sync. Identify transient errors, and if so return -EAGAIN so that caller would retry. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
that way we don't depend on remote peer to be available Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
…d configured Signed-off-by: Orit Wasserman <owasserm@redhat.com>
this fixes an assert() on shutdown Signed-off-by: Casey Bodley <cbodley@redhat.com>
…ket exists rgw_build_policies set the bucket_exists flag Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
for use by RGWRealmPusher Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
RGWPostRESTResourceCR needs to make a copy of the parameters given to its constructor, because it doesn't use them until send_request(). this results in a segfault when the given parameter list is on the stack Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
this fixes a segfault in the RGWPostRESTResourceCR::request_complete() error path, which accessed http_op after calling put() Signed-off-by: Casey Bodley <cbodley@redhat.com>
[rgw multisite] refactoring and fixes for RGWREST Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
The shard we use for each entry (either meta, or data) needs to be selected correctly to match the different logs we keep. Otherwise async notifications don't work correctly Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: store metadata sync status on period commit Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
…oroutines Signed-off-by: Orit Wasserman <owasserm@redhat.com>
RGWRemoteMetaLog::run_sync() was getting stuck in an infinite loop after a call to RGWCoroutinesManager::stop(). instead of returning success when we see 'going_down', fail the coroutine with ECANCELED the other RGWCoroutinesManager::run() overload also needed modification to prevent us from overwriting this error code Signed-off-by: Casey Bodley <cbodley@redhat.com>
rgw: coroutine manager returns ECANCELED when going down Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
clone_shards() was an exact duplicate for fetch() Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
by using RGWRados::key_to_shard_id(), we can avoid the dependency on RGWMetadataLog's prefix (and period) Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
RGWMetaSyncCR uses a period history Cursor to track its position. it uses this to get the max sync markers for each shard from the following period, so that RGWMetaSyncShardCR knows when to stop syncing and return control to RGWMetaSyncCR Signed-off-by: Casey Bodley <cbodley@redhat.com>
@yehudasa there are two XXX: comments that I'd appreciate your feedback on, in addition to the design in general |
@cbodley ok, thanks. I'll take a look at it. |
@@ -1344,9 +1258,10 @@ class RGWMetaSyncShardCR : public RGWCoroutine { | |||
sync_marker.marker = sync_marker.next_step_marker; | |||
sync_marker.next_step_marker.clear(); | |||
} | |||
// XXX: why write the marker if !can_adjust_marker? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbodley I think you have a point here, probably want to skip writing the marker in that case
4c4e501
to
ac168e3
Compare
rebased, merged in a different PR |
This is a first draft of the metadata sync refactor that separates the logs for each period. It passes the existing multisite tests, but those only create a single period so don't exercise most of the new logic.
TODO: implement find_oldest_log_period() for RGWMetadataManager, which is currently a hack that returns the current period
TODO: update multisite tests to operate over multiple periods