]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: Allow multiple objects with same version in missing list. 69450/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Wed, 8 Apr 2026 10:49:58 +0000 (11:49 +0100)
committerPatrick Donnelly <pdonnell@ibm.com>
Sat, 13 Jun 2026 13:33:47 +0000 (09:33 -0400)
commit7decdf21123682a4487944bf09438f197d3c1a8f
tree3127669556dd7085f210c316ced2650f5b666ee1
parentd7b629491842890a7ff61beb7d5c9640dda8976d
osd: Allow multiple objects with same version in missing list.

Most of the time, a single version in a PG can only correspond to a single object.

However, following a PG merge it is possible, even likely, that two objects will
have the same version.   The PG Log works around this by discarding the log.

However, during backfill, it is possible for the missing list to be build with
these duplicate versions.

A recently added assert detected that this scenario was corrupting the reverse
missing list (rmissing). This behaviour has always existed, but was previously
unnoticed.  It could cause some bugs and potentially loop-asserts on OSDs,
although mostly would not be noticed.

Here we fix this properly, by converting rmissing to a multimap. This is wrapped
in some insert functions, which assert that the rmissing list does not end up
with duplicate entries.  The code is optimised for the case where there are no
duplicate versions.

Additionally, some of the old asserts have been rolled into the insert functions.

Fixes: https://tracker.ceph.com/issues/75778
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
(cherry picked from commit f3940400952b444a31f59b633fa3fa35437c87a9)
src/crimson/osd/pg_recovery.cc
src/osd/PrimaryLogPG.cc
src/osd/osd_types.h
src/test/osd/types.cc