From 84eded7f68ca379068526f063d7b8c7144a978c3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 8 Aug 2008 10:46:18 -0700 Subject: [PATCH] osd: only re-push pulled object if active, to avoid weird interaction with repeering --- src/osd/OSD.cc | 1 + src/osd/ReplicatedPG.cc | 24 ++++++++++++++---------- src/vstartnew.sh | 4 ++-- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5d7ddc9167c68..47b3584307d74 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2487,6 +2487,7 @@ void OSD::_process_pg_info(epoch_t epoch, int from, } else { if (!pg->info.dne()) { // i am REPLICA + // merge log pg->merge_log(log, missing, from); pg->proc_missing(log, missing, from); diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index dba5807fcd275..7d98c4f612be1 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1571,18 +1571,22 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op) if (is_primary()) { - // are others missing this too? - for (unsigned i=1; iget_nodeid()); - do_recovery(); + + if (is_active()) { + // are others missing this too? (only if we're active.. skip + // this part if we're still repeering, it'll just confuse us) + for (unsigned i=1; iosdmap->get_epoch(), false); diff --git a/src/vstartnew.sh b/src/vstartnew.sh index d4f0e2ca4db4b..dd197de1ec1e4 100755 --- a/src/vstartnew.sh +++ b/src/vstartnew.sh @@ -27,14 +27,14 @@ $CEPH_BIN/monmaptool --create --clobber --add $IP:12345 --add $IP:12346 --add $I for f in 0 1 2 do $CEPH_BIN/mkmonfs --clobber mondata/mon$f --mon $f --monmap .ceph_monmap - $CEPH_BIN/cmon -d mondata/mon$f --debug_mon 20 --debug_ms 1 --debug_paxos 10 + $CEPH_BIN/cmon -d mondata/mon$f --debug_mon 20 --debug_ms 1 --debug_paxos 20 done # build and inject an initial osd map $CEPH_BIN/osdmaptool --clobber --createsimple .ceph_monmap 4 --print .ceph_osdmap # --pgbits 2 $CEPH_BIN/cmonctl osd setmap -i .ceph_osdmap -for osd in 0 #1 2 3 #4 5 6 7 8 9 10 11 12 13 14 15 +for osd in 0 1 2 3 #4 5 6 7 8 9 10 11 12 13 14 15 do $CEPH_BIN/cosd --mkfs_for_osd $osd dev/osd$osd # initialize empty object store echo valgrind --leak-check=full --show-reachable=yes $CEPH_BIN/cosd dev/osd$osd --debug_ms 1 --debug_osd 20 --debug_filestore 10 --debug_ebofs 20 #1>out/o$osd #& #--debug_osd 40 -- 2.39.5