Skip to content

rgw: only log metadata on metadata master zone - #15613

Merged
cbodley merged 1 commit into
ceph:masterfrom
cbodley:wip-20244
Jun 13, 2017
Merged

cbodley merged 1 commit into
ceph:masterfrom
cbodley:wip-20244

Conversation

@cbodley

@cbodley cbodley commented Jun 10, 2017

Copy link
Copy Markdown
Contributor

@oritwas

oritwas commented Jun 11, 2017

Copy link
Copy Markdown
Member

jenkins test this please

@cbodley

cbodley commented Jun 12, 2017

Copy link
Copy Markdown
Contributor Author

jenkins test this please

1 similar comment
@oritwas

oritwas commented Jun 13, 2017

Copy link
Copy Markdown
Member

jenkins test this please

@cbodley
cbodley merged commit 9d7b477 into ceph:master Jun 13, 2017
@cbodley
cbodley deleted the wip-20244 branch June 13, 2017 14:37
Comment thread src/rgw/rgw_rados.h

bool need_to_log_metadata() {
return get_zone().log_meta;
return is_meta_master() && get_zone().log_meta;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means master zone in slave zonegroup will not log metadata too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, and RGWZoneGroup::post_process_params() has already been enforcing this in radosgw-admin commands:

  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);

this pr just moved that enforcement into RGWRados itself, so that we can properly handle zones that were created before jewel and hadn't triggered that code in RGWZoneGroup::post_process_params()

after jewel, if multiple zones have log_meta set, the secondary zone will add each mdlog entry that it syncs from the metadata master back into its mdlog, and then keep resyncing/rewriting that entry, filling up its mdlog with duplicate entries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants