Repository navigation
rgwlc: remove explicit lc shard resets at start-of-run - #40703
Conversation
8b58240 to
db9b4a8
Compare
|
I do worry about the case where we fall behind for some reason, and then the next day finish the previous day's work, and then miss half of that day's work, because we were half way through the shard. So things that should have (and possibly could have) been processed that day will wait for the next day. It's not a huge issue, for sure, but maybe keep track whether we started the day at the beginning, and if we didn't, start over immediately? Although that will tend to propagate the issue forward into the next day, and make it more likely to continue. And, if we don't do it, then may be the next day won't have enough time to finish because of work from today, that could have been done if we started over. |
83d90b5 to
9fee25a
Compare
e02f033 to
4e15e76
Compare
|
fyi, the 3.3z7 version of this has passed downstream QE testing |
|
(building for a teuthology run...) |
|
ok, so I think this is a pass |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
4e15e76 to
396a310
Compare
396a310 to
4ce3704
Compare
|
Yeah, looks correct |
@mattbenjamin yeah, i agree that it's probably a pass. but since this PR does involve lifecycle, it's probably a good idea to do a |
|
@cbodley yeah, it needs a new run anyway, with all the commits |
|
jenkins test make check |
|
Looks like again 1 lc run failed--many must have succeeded: |
|
@soumyakoduri thanks for reviewing! |
|
@dang another pass :) |
|
@mkogan1 do you notice anything suspicious? :) |
|
@dang there is a bug or bug in advance_head, will update in a bit :( |
dd2bc45 to
b327dc3
Compare
|
(this passed) |
|
jenkins test make check |
Provide an option to disable automatic clearing of stale sessions-- which, unless disabled, happens after 2 lifecycle scheduling cycles. The default behavior is most likely not desired when a debugging or testing lifecycle processing with rgw_lc_debug_interval is set, and therefore re-entering a running session after 2 scheduling cycles is fairly likely. Signed-off-by: Matt Benjamin <[email protected]>
The intent is to permit tracing of the bucket processing scheduler, without expiring or transitioning any objects. Signed-off-by: Matt Benjamin <[email protected]>
This is an alternative solution to the (newly exposed) lifecycle shard starvation problem reported by Jeegen Chen. There was always an starvation condition implied by the reset of lc shard head at the start of processing. The introduction of "stale sessions" in parallel lifecycle changes made it more visible, in particular when rgw_lc_debug_interval was set to a small value and many buckets had lifecycle policy. My hypothesis in this change is that lifecycle processing for each lc shard should /always/ continue through the full set of eligible buckets for the shard, regardless of how many processing cycles might be required to do so. In general, restarting at the first eligible bucket on each reschedule invites starvation when processing "gets behind", so just avoid it. Fixes: https://tracker.ceph.com/issues/49446 Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit 6e2ae13adced6b3dbb2fe16b547a30e9d68dfa06) rgwlc: add a wraparound to continued shard processing If the full set of buckets for a given lc shard couldn't be processed in the prior cycle, processing will start with a non-empty marker. Note the initial marker position, then when the end of shard is reached, allow processing to wrap around to the logical beginning of the shard and proceeding through the initial marker. Signed-off-by: Matt Benjamin <[email protected]> Please enter the commit message for your changes. Lines starting (cherry picked from commit 0b8f683d3cf444cc68fd30c3f179b9aa0ea08e7c) don't report clearing incorrectly Signed-off-by: Matt Benjamin <[email protected]>
Remove now-unused RGWLC::bucket_lc_prepare. Wrap serializer calls in RGWLC::process(int index...) with simple backoff, limited to 5 retries. In RGWLC::process(int index...), also open-coded the behavior of RGWLC::bucket_lc_prepare(...), as the lock sharing between these methods is error prone. For now, that method exists, so that it can be called from the single-bucket process. Signed-off-by: Matt Benjamin <[email protected]>
Signed-off-by: Matt Benjamin <[email protected]>
Conveniently, this arose after removing all lifecycle shards from RADOS, proving it could be done safely. A restart is currently needed to recognize new lifecycle shards, if rgw_gc_max_objs also changed. Signed-off-by: Matt Benjamin <[email protected]>
E.g.,
[
{
"bucket": ":bucket1:f2f4a8dd-7ec9-4758-bc4f-c8f5fbc85109.4137.2",
"shard": "lc.6",
"started": "Fri, 18 Feb 2022 17:30:16 GMT",
"status": "COMPLETE"
},
...
]
The prototyped approach adds a copy of the shard name (which is
assured to be a small string) to rgw::sal::LCEntry. It's not
expected to be represented in underlying store types.
Signed-off-by: Matt Benjamin <[email protected]>
Restore (and robustify) the assertion that, in general, each bucket shard should be processed once per scheduling cycle. If the prior cycle did not finish, processing in the current cyhcle will continue from the marker where the last cycle left off. Signed-off-by: Matt Benjamin <[email protected]>
On review, this constraint was correct--it does reliably prevent same-cycle re-runs when a lc threads rendezvous on a bucket. Also, for concurrent (or stale) and already processed buckets, remember to advance head past the corresponding buckets. Signed-off-by: Matt Benjamin <[email protected]>
b327dc3 to
0c42370
Compare
Adjust wait time to fix spurious failures reported - ceph/ceph#40703 (comment) http://qa-proxy.ceph.com/teuthology/mbenjamin-2022-02-23_15:42:19-rgw-wip-rgwlc-noreset-distro-basic-smithi/6703349/teuthology.log Signed-off-by: Soumya Koduri <[email protected]>
Adjust wait time to fix spurious failures reported - ceph/ceph#40703 (comment) http://qa-proxy.ceph.com/teuthology/mbenjamin-2022-02-23_15:42:19-rgw-wip-rgwlc-noreset-distro-basic-smithi/6703349/teuthology.log Signed-off-by: Soumya Koduri <[email protected]>
Adjust wait time to fix spurious failures reported - ceph/ceph#40703 (comment) http://qa-proxy.ceph.com/teuthology/mbenjamin-2022-02-23_15:42:19-rgw-wip-rgwlc-noreset-distro-basic-smithi/6703349/teuthology.log Signed-off-by: Soumya Koduri <[email protected]>
This is an alternative solution to the (newly exposed) lifecycle
shard starvation problem reported by Jeegen Chen.
There was always an implied starvation condition implied by the
reset of lc shard head at the start of processing. The introduction
of "stale sessions" in parallel lifecycle changes made it more
visible, in particular when rgw_lc_debug_interval was set to a small
value and many buckets had lifecycle policy.
My hypothesis in this change is that lifecycle processing for each
lc shard should /always/ continue through the full set of eligible
buckets for the shard, regardless of how many processing cycles might
be required to do so. There is no semantic basis for restarting at the
first eligible bucket in any circumstance, and doing so was itself
a latent bug.
Fixes: https://tracker.ceph.com/issues/49446
Signed-off-by: Matt Benjamin [email protected]
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox