Skip to content

rgw multisite: add bucket log generation to datalog entries#38561

Closed
adamemerson wants to merge 4 commits intoceph:wip-rgw-multisite-reshardfrom
adamemerson:wip-rgw-datalog-reshard
Closed

rgw multisite: add bucket log generation to datalog entries#38561
adamemerson wants to merge 4 commits intoceph:wip-rgw-multisite-reshardfrom
adamemerson:wip-rgw-datalog-reshard

Conversation

@adamemerson
Copy link
Contributor

Add the generation id to the datalog.

In Data Sync send entries with an earlier data log to the error repo for retry.

(Moved the gen_id from the bucket shard to the data change as part of debugging, partly because Yehuda suggested it in an email.)

@adamemerson adamemerson force-pushed the wip-rgw-datalog-reshard branch from 0ef90d5 to 381769f Compare January 18, 2021 23:12
@cbodley
Copy link
Contributor

cbodley commented Jan 21, 2021

@adamemerson I feel like the first half of this PR should merge to master and get backported for pacific, and the second half that touches the datalog entries and data sync should instead target the https://github.com/ceph/ceph/commits/wip-rgw-multisite-reshard working branch. could you please split this up so we can get the init_default_bucket_layout() fixes in for master/pacific asap?

@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Drop entries from past generations.

Send entries of future generations to the error repo for retry.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
@adamemerson
Copy link
Contributor Author

@cbodley Do we want to merge this in and pull in the error repo and urgent later, or fold this, error repo, and urgent in together?

DataLogEntityType entity_type;
std::string key;
ceph::real_time timestamp;
uint64_t gen_id;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we please name this gen to be consistent with the fields in rgw_bucket_layout.h?


void encode(ceph::buffer::list& bl) const {
ENCODE_START(1, 1, bl);
ENCODE_START(2, 2, bl);
Copy link
Contributor

Choose a reason for hiding this comment

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

this raises the compat version to 2, which means that DECODE_START(2, bl) below would throw if it gets a struct_v < 2, and we wouldn't reach this backward-compatible decode logic:

     if (struct_v < 2)
       gen_id = 0;
     else
       decode(gen_id, bl);

this would cause issues with rolling upgrades in a zone with multiple radosgws

@cbodley cbodley changed the title Wip rgw datalog reshard rgw multisite: add bucket log generation to datalog entries Feb 3, 2021
@cbodley cbodley changed the base branch from master to wip-rgw-multisite-reshard February 3, 2021 18:20
@cbodley cbodley requested review from a team as code owners February 3, 2021 18:20
@cbodley
Copy link
Contributor

cbodley commented Feb 3, 2021

i retargeted this to ceph:wip-rgw-multisite-reshard. could you please rebase to resolve the conflicts there?

@github-actions
Copy link

github-actions bot commented Feb 3, 2021

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@cbodley
Copy link
Contributor

cbodley commented Feb 10, 2021

@adamemerson i rebased, tested, and got this working in #39396. could you please review the changes?

@cbodley
Copy link
Contributor

cbodley commented Feb 11, 2021

thanks @adamemerson! this merged into #39002

@cbodley cbodley closed this Feb 11, 2021
@adamemerson adamemerson deleted the wip-rgw-datalog-reshard branch September 15, 2022 21:49
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