Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
osd/PG: fix objects degraded higher than 100% #18297
referenced this pull request
Oct 23, 2017
@liewegas @gregsfortytwo The code as of this time does not address the customer complaint about degraded when backfill is NOT involved. In the example below we took osd.1 out, but during recovery there is no knowledge that the out OSD contains all the objects:
UP/ACTING [1, 0]
Hmm, the misplaced calculation still confuses me... I think because the definition of what misplaced means feels fuzzy. Here's my attempt at a concrete definition... does this makes sense?
If that's the case, then we should be able to consider the up and acting osds, and then look at every location in the 'up' set and decide whether the object is clean, degraded, or misplaced. And in the end num_object_copies == clean + misplaced + degraded.
( Not related to your most recent comment)
My latest commit counts the 100 objects on osd.1 which isn't part of UP/ACTING during recovery but
Should misplaced be larger than num_object_copies? When I did the following:
All the misplaced where the 200 objects on each of 0, 1, 2, 4.
Even though degraded state is set, we don't end up counting any objects as degraded because they are still on 0, 1, 2, 4 which aren't down. The 400 missing objects on 3, 5 aren't degraded because you won't lose data if there is a crash.
Also, note that with the current code the misplaced doesn't change as the recovery proceeds.
Using my definition above, going from [0,1,2,4] -> [3,5] should resulting in 100% misplaced, but not > 100%.
The scenario where it falls apart is when you are deleting objects. Say you go from 100->10 objects and are backfilling... are the 90 'missing' deletes degraded or misplaced? Not according to the above, but that would mean we don't reflect them at all in the degraded or misplaced report, even though the PG has work to do. Not sure the get_num_missing() tells you deletes vs updates, though. It'll probably be close enough..