]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: more useful debugging on repop version, out of order completion
authorSage Weil <sage@newdream.net>
Thu, 22 Apr 2010 22:05:55 +0000 (15:05 -0700)
committerSage Weil <sage@newdream.net>
Thu, 22 Apr 2010 22:12:58 +0000 (15:12 -0700)
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index 378c6b7839d39d7851a63fb7629fced978a9c778..56a075152c2174594f6467b6314f78583b1d1212 100644 (file)
@@ -622,6 +622,7 @@ void ReplicatedPG::do_op(MOSDOp *op)
   // issue replica writes
   tid_t rep_tid = osd->get_tid();
   RepGather *repop = new_repop(ctx, obc, noop, rep_tid);
+  repop->v = ctx->at_version;
 
   // note: repop now owns ctx AND ctx->op
 
@@ -1930,7 +1931,11 @@ void ReplicatedPG::eval_repop(RepGather *repop)
     dout(10) << " removing " << *repop << dendl;
     assert(!repop_queue.empty());
     dout(20) << "   q front is " << *repop_queue.front() << dendl; 
-    assert(repop_queue.front() == repop);
+    if (repop_queue.front() != repop) {
+      dout(0) << " removing " << *repop << dendl;
+      dout(0) << "   q front is " << *repop_queue.front() << dendl; 
+      assert(repop_queue.front() == repop);
+    }
     repop_queue.pop_front();
     repop_map.erase(repop->rep_tid);
     repop->put();
index 226b94acba7ff4fbe06a2453cd2a5a01036eabcd..f5ff2e3a482733b57a3eecf2a6d4bf8d18fca71c 100644 (file)
@@ -317,6 +317,8 @@ public:
     xlist<RepGather*>::item queue_item;
     int nref;
 
+    eversion_t v;
+
     OpContext *ctx;
     ObjectContext *obc;
 
@@ -611,6 +613,7 @@ inline ostream& operator<<(ostream& out, ReplicatedPG::RepGather& repop)
   out << "repgather(" << &repop
       << (repop.applying ? " applying" : "")
       << (repop.applied ? " applied" : "")
+      << " " << repop.v
       << " rep_tid=" << repop.rep_tid 
       << " wfack=" << repop.waitfor_ack
     //<< " wfnvram=" << repop.waitfor_nvram