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: log_meta only for more than one zone #15777

Merged
merged 4 commits into from Jul 6, 2017

Conversation

Projects
None yet
6 participants
@oritwas
Contributor

oritwas commented Jun 20, 2017

Fixes: http://tracker.ceph.com/issues/20357
Signed-off-by: Orit Wasserman owasserm@redhat.com

@@ -426,7 +426,7 @@ void RGWZoneGroup::post_process_params()
for (map<string, RGWZone>::iterator iter = zones.begin(); iter != zones.end(); ++iter) {
RGWZone& zone = iter->second;
zone.log_data = log_data;
zone.log_meta = (is_master && zone.id == master_zone);
zone.log_meta = (is_master && zone.id == master_zone && zone.name != default_zone_name);

This comment has been minimized.

@cbodley

cbodley Jun 20, 2017

Contributor

i worry that this would cause problems for default configurations that are later extended with more zones (that's possible to do since #10477). ideally this check would be based on num_zonegroups == 1 && num_zones == 1, but that's tricky to do in a RGWZoneGroup member function during a zone[group] modify command

maybe it would be better to take the approach from #15613, and add logic to RGWRados::need_to_log_metadata() that could inspect the current_period to count zonegroups/zones?

This comment has been minimized.

@oritwas

oritwas Jun 20, 2017

Contributor

@cbodley ,another possibility is to check that the current period is empty (default zg and zone don't have a period or realm).
I will also update need_to_log_metadata.

This comment has been minimized.

@oritwas

oritwas Jun 20, 2017

Contributor

Also post_process_params is called when updating placement group, I think we should update log_meta only if the zone was set to master and not touch it in other cases

@oritwas oritwas changed the title from rgw: do not set log meta for default zone to rgw: log_meta only for more than one zone Jun 21, 2017

@@ -3567,7 +3567,7 @@ class RGWRados
}
bool need_to_log_metadata() {
return is_meta_master() && get_zone().log_meta;
return is_meta_master() && get_zone().log_meta && get_zonegroup().zones.size() > 1;

This comment has been minimized.

@cbodley

cbodley Jun 21, 2017

Contributor

we still want this to return true in a configuration that has two zonegroups, each with one zone. the secondary zonegroup would still sync metadata from the meta master

This comment has been minimized.

@oritwas

oritwas Jun 22, 2017

Contributor

right , I will remove log_meta and fix this

zealoussnow and others added some commits Jun 13, 2017

rgw: log_meta only for more than one zone
Fixes: http://tracker.ceph.com/issues/20357
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
rgw: is_single_zonegroup doesn't use store or cct
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
rgw: we no longer use log_meta
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
@cbodley

added a suggestion to simplify is_multi_zonegroups_with_zones(), but i'm happy with the pr as is 👍

}
}
return false;
}

This comment has been minimized.

@cbodley

cbodley Jun 22, 2017

Contributor

what do you think about making a get_num_zones() that just counts the zones from all zonegroups? then you wouldn't need to split single-zonegroup and multi-zonegroup cases

need_to_log_metadata() could use get_num_zones() > 1 and is_syncing_bucket_meta() could use get_num_zones() == 1

This comment has been minimized.

@yehudasa

@yuriw yuriw merged commit 5bbc50a into ceph:master Jul 6, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
arm64 make check arm64 make check succeeded
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment