]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PrimaryLogPG: Relax replicated reads when recovering 62805/head
authorMatan Breizman <mbreizma@redhat.com>
Mon, 14 Apr 2025 08:25:39 +0000 (08:25 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 22 Apr 2025 11:54:06 +0000 (11:54 +0000)
commit4ff38bdecaec1f0618fc363162353a477efc26ea
tree1a0fb83bf923bbec5b6c8080d745b94603d29f9b
parentf9a47a22c4adb7ddbd6264945e271c35c25ded71
osd/PrimaryLogPG: Relax replicated reads when recovering

In replicated read scenario we first check if is_unreadable_object
for the head object. If so, l_osd_replica_read_redirect_missing is
incremented.

Later on, we check if can_serve_replica_read, if we've seen any writes
on this object(head) l_osd_replica_read_redirect_conflict is incremented.

Lastly, the object context is needed to be obtained
(find_object_context), if the requested object is a clone object -
we will need to resolve it to the corresponding actual object from
the OSD prespective.

There could be cases where the clone object is actually missing and
we would have to drop the replicated read rather late in the flow -
only once find_object_context will fail to get the relevant obc.

Moreover, in this case l_osd_replica_read_redirect_missing is not
incremented while l_osd_replica_read_served was already incremented even
if it was dropped.

We could alternatively, update the perf counters in the correct manner
but it seem that it's safer to avoid this niche and error prone path
in the first place.

See (pg_missing_t, is_missing_any_head_or_clone_of) tests for example on
the new check added.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h