crimson/osd/recovery_backend: scan_for_backill tries to load the metadata even if the obc is already in the cache while its existed is false#60989
Conversation
|
jenkins test api |
There was a problem hiding this comment.
This PR contains 2 changes, the first is the avoiding the obc reload (which lgtm) while the second commit is the removal of the !existed case. Previously, we returned in that case and now we reload the metadata. Can you either explain why or separate the commits? Thank you!
| } else { | ||
| // if the object does not exist here, it must have been removed | ||
| // between the collection_list_partial and here. This can happen | ||
| // for the first item in the range, which is usually last_backfill. | ||
| } |
There was a problem hiding this comment.
Can you please explain why this case is no longer relevant?
There was a problem hiding this comment.
I think this case still exists, in which the later "load_metadata" also returns an empty obc and the object won't be put into the backfill interval. So it looks to me that this PR doesn't conflict with the main branch in this case, am I right?
There was a problem hiding this comment.
Yes, we will still hit this case when trying to reload although it's less explicit now.
| obc = pg.obc_registry.maybe_get_cached_obc(object); | ||
| } | ||
| if (obc) { | ||
| if (obc->obs.exists) { |
There was a problem hiding this comment.
scan_for_backill tries to load the metadata even if the obc is already in the cache while its existed is false
I might be missing something, when the above if case (obc->obs.exists) will be false and we will return in line 251, without loading the metadata. Right?
Meaning we have 3 cases (before the patch):
- obc found in cache && exists is true -> emplace it.
- obc found in cache && exists is false -> return
- obc not found -> load_metadata
With this patch the 3 cases are:
- obc found in cache && exists is true -> emplace it.
- obc found in cache && exists is false -> load_metadata
- obc not found -> load_metadata
This change is not reflected in the commit message/title, am I right? Is this the intended behavior?
There was a problem hiding this comment.
Let me know if this is correct:
crimson/osd/recovery_backend: fix scan_for_backill metadata reload
Currently there are 3 cases (before the patch):
obc found in cache && exists is true -> emplace it.
obc found in cache && exists is false -> return
obc not found -> load_metadata
We should reload the metadata **also** when exists is false in order to
exclude the possibility that there's an ongoing obc load.
Fixes: https://tracker.ceph.com/issues/69154
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
There was a problem hiding this comment.
Yes, that's right:-) Will update the commit message.
| } else { | ||
| // if the object does not exist here, it must have been removed | ||
| // between the collection_list_partial and here. This can happen | ||
| // for the first item in the range, which is usually last_backfill. | ||
| } |
There was a problem hiding this comment.
Yes, we will still hit this case when trying to reload although it's less explicit now.
metadata even if the obc is already in the cache while its existed is false Currently there are 3 cases (before the patch): obc found in cache && exists is true -> emplace it. obc found in cache && exists is false -> return obc not found -> load_metadata We should reload the metadata **also** when exists is false in order to exclude the possibility that there's an ongoing obc load. Fixes: https://tracker.ceph.com/issues/69154 Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
47b6c4b to
fc80387
Compare
|
@Matan-B I've just updated the commit message, please take a look again, thanks:-) |
|
I also think it's probably better to use the new obc manager machinery rather than explicitly checking loaded. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
closing this PR in favour of #61536 |
Fixes: https://tracker.ceph.com/issues/69154
Signed-off-by: Xuehan Xu xuxuehan@qianxin.com
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.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 dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e