]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/PG: adjust pg history on fabricated merge target if necessary
authorSage Weil <sage@redhat.com>
Thu, 7 Mar 2019 14:38:02 +0000 (08:38 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Mar 2019 14:38:06 +0000 (08:38 -0600)
commit06a7bf439139023a8dd1d4c1e675432c84c6e10c
tree3592af6c81dc77dbe0f7fb3dca051fda9bb4734c
parente030ba465def5b6d3a0d820b0de42e39caa6a983
osd/PG: adjust pg history on fabricated merge target if necessary

If we have to fabricate the merge target, we use the pg_history from
the soruce to start with, since it is normally close enough.  However, if
we get a last_epoch_clean that is > the same_interval_since, then on the
next interval change the past_intervals will have a start that is after
last_epoch_clean, resulting in a past_intervals assert.

Avoid this situation by adjusting the pg_history backwards to match
last_epoch_started (which is always <= last_epoch_clean).  This makes
the most sense because these values came from the *real* target, while
the history was from the source.

Fixes: http://tracker.ceph.com/issues/38623
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc