Skip to content

rgw: Generational BILog Trim - #41051

Closed
adamemerson wants to merge 9 commits into
ceph:wip-rgw-multisite-reshardfrom
adamemerson:wip-multisite-reshard-trim
Closed

adamemerson wants to merge 9 commits into
ceph:wip-rgw-multisite-reshardfrom
adamemerson:wip-multisite-reshard-trim

Conversation

@adamemerson

Copy link
Copy Markdown
Contributor

Generational BILog trim.

Comment thread src/rgw/rgw_reshard.cc Resolved
Comment thread src/rgw/rgw_reshard.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
@cbodley

cbodley commented Apr 29, 2021

Copy link
Copy Markdown
Contributor

thanks @adamemerson, but this logic needs to be integrated with the background trim logic in rgw_trim_bilog.cc rather than the admin api/command

when the background trimming thread identifies a bucket to trim, it spawns BucketTrimInstanceCR to query the peer zone's markers, then uses RGWRadosBILogTrimCR to issue the rados cls calls

we need to teach BucketTrimInstanceCR about generations. if, for example, we have logs for gens 0,1,2 but all of the peers are on gen=2, we can delete the logs for 0 and 1 and update the bucket instance's layout accordingly

however, this trimming logic is careful to throttle how much work it does on each bucket, because too many omap deletes can melt osds. so we probably want to limit BucketTrimInstanceCR to a single gen deletion per call?

@adamemerson
adamemerson force-pushed the wip-rgw-multisite-reshard branch from 36c2959 to 95355ab Compare May 12, 2021 16:05
@github-actions

Copy link
Copy Markdown

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

@adamemerson
adamemerson force-pushed the wip-multisite-reshard-trim branch from c0d6675 to 2ff7e2d Compare May 12, 2021 20:17
@adamemerson
adamemerson force-pushed the wip-multisite-reshard-trim branch 2 times, most recently from 6cbcd02 to cd4c8c7 Compare May 14, 2021 23:05
@adamemerson

Copy link
Copy Markdown
Contributor Author

@cbodley re²view if you would, please.

@cbodley cbodley changed the title Generational BILog Trim rgw: Generational BILog Trim May 17, 2021
Comment thread src/rgw/rgw_json_enc.cc Resolved
Comment thread src/rgw/rgw_reshard.h Resolved
Comment thread src/rgw/rgw_rest_log.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_bucket_layout.h Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
@smanjara
smanjara self-requested a review May 18, 2021 05:58
@adamemerson
adamemerson force-pushed the wip-multisite-reshard-trim branch from cd4c8c7 to 0e08a8f Compare May 18, 2021 22:40
@adamemerson

Copy link
Copy Markdown
Contributor Author

@cbodley Please re³view.

@ceph ceph deleted a comment from github-actions Bot May 18, 2021
@adamemerson

Copy link
Copy Markdown
Contributor Author

There's one test failure, but it looks to be an issue with BILog_List in radosgw-admin

Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_rest_log.cc Resolved
Needed so we can get the incremental generation.

Guard this behind a version check and return the original output if
less than 2.

Signed-off-by: Adam C. Emerson <[email protected]>
To bucket_index_layout_generation

Signed-off-by: Adam C. Emerson <[email protected]>
Fetch the current generation from remote peers and trim the minimum
marker on the minimum generation.

Signed-off-by: Adam C. Emerson <[email protected]>
From the REST interface and radosgw-admin. Assume Generation 0 if none
provided and error if it doesn't exist.

Signed-off-by: Adam C. Emerson <[email protected]>
A more generally applicable way of removing objects in coroutines.

Signed-off-by: Adam C. Emerson <[email protected]>
@adamemerson
adamemerson force-pushed the wip-multisite-reshard-trim branch from 0e08a8f to ff84465 Compare May 26, 2021 22:03
@adamemerson

Copy link
Copy Markdown
Contributor Author

@cbodley Please re⁴view.

@adamemerson
adamemerson force-pushed the wip-multisite-reshard-trim branch from ff84465 to c96c51c Compare May 27, 2021 15:59
Comment thread src/rgw/rgw_reshard.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Comment thread src/rgw/rgw_trim_bilog.cc Resolved
Only one generation per call.

Signed-off-by: Adam C. Emerson <[email protected]>
@adamemerson
adamemerson force-pushed the wip-multisite-reshard-trim branch from c96c51c to ea950a9 Compare June 2, 2021 18:03
@adamemerson

Copy link
Copy Markdown
Contributor Author

@cbodley Okay, let's see if we're good.

@cbodley cbodley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good! let's start thinking about how to get some test coverage, especially for the deletion of old generations and updates to the bucket info

@cbodley

cbodley commented Jun 3, 2021

Copy link
Copy Markdown
Contributor

rebased and merged into #39002, thanks @adamemerson!

@cbodley cbodley closed this Jun 3, 2021
@adamemerson
adamemerson deleted the wip-multisite-reshard-trim branch September 15, 2022 21:51
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.

4 participants