]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
fix wrong value of op_w_latency perf counter
authorxinxin shu <xinxin.shu@intel.com>
Tue, 26 Aug 2014 05:37:14 +0000 (13:37 +0800)
committerxinxin shu <xinxin.shu@intel.com>
Tue, 26 Aug 2014 06:19:03 +0000 (14:19 +0800)
Fixes: #9217
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index 7682c9837acaa7f64021b49aa0bb2c85cbb67bfa..36c20c662be7931d7559d4269b9f0692b7131788 100644 (file)
@@ -6781,7 +6781,10 @@ void ReplicatedPG::eval_repop(RepGather *repop)
     // ondisk?
     if (repop->all_committed) {
 
-      log_op_stats(repop->ctx);
+      if (!repop->log_op_stat) {
+        log_op_stats(repop->ctx);
+        repop->log_op_stat = true;
+      }
       publish_stats_to_osd();
 
       // send dup commits, in order
index 324ca42ed2344dd5626218c31104571b5672744f..c9399b499256cfd6fe6f44e06d78b83153c36642 100644 (file)
@@ -618,6 +618,7 @@ public:
     bool queue_snap_trimmer;
 
     Context *on_applied;
+    bool log_op_stat;
     
     RepGather(OpContext *c, ObjectContextRef pi, ceph_tid_t rt,
              eversion_t lc) :
@@ -631,7 +632,8 @@ public:
       sent_disk(false),
       pg_local_last_complete(lc),
       queue_snap_trimmer(false),
-      on_applied(NULL) { }
+      on_applied(NULL),
+      log_op_stat(false) { }
 
     RepGather *get() {
       nref++;