]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
PG: persist divergent_priors in ondisklog
authorSamuel Just <sam.just@inktank.com>
Mon, 5 Nov 2012 23:40:43 +0000 (15:40 -0800)
committerSamuel Just <sam.just@inktank.com>
Tue, 13 Nov 2012 18:56:10 +0000 (10:56 -0800)
commit193e2ea532e9b18291ef2cf56b6423ce2d5487c2
treeec76ec7f4ebc3b5ba8e67b85d4fb6812bf22ed5d
parentfcbbebc3d8fb88c111d24fa98b991277331aaebb
PG: persist divergent_priors in ondisklog

Consider the following logs:

a) 10'10(5'7) foo
   12'11(4'3) bar

b) 10'10(5'7) foo
   13'11(4'4) baz

When the osd with a merges primary log b, bar is deleted and
added to the missing set with need=4'3 and have=0'0.  If
the osd then dies after deleting bar, but before recovering
bar, PG::read_state() on start up will fail to re-add bar
to the missing set, and bar will be incorrect on that osd.

Now, (4'3, bar) will be added to the divergent_priors mapping
to be scanned during read_state along with the log.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc
src/osd/PG.h