]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
skip promote if flag set when doing proxy read
authorYunchuan Wen <yunchuanwen@ubuntukylin.com>
Fri, 21 Aug 2015 06:38:21 +0000 (14:38 +0800)
committerYunchuan Wen <yunchuanwen@ubuntukylin.com>
Fri, 21 Aug 2015 06:38:21 +0000 (14:38 +0800)
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Reviewed-by: Li Wang <liwang@ubuntukylin.com>
src/osd/ReplicatedPG.cc

index fba7494ae0d387d03d39a3515c051fb45b3aee6e..eeb3f8453748a0f4a6c9d8f0c298ca033b9587b5 100644 (file)
@@ -1954,9 +1954,12 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
       }
 
       // Promote too?
-      bool promoted = maybe_promote(obc, missing_oid, oloc, in_hit_set,
-                                   pool.info.min_read_recency_for_promote,
-                                   promote_op);
+      bool promoted = false;
+      if (!op->need_skip_promote()) {
+        promoted = maybe_promote(obc, missing_oid, oloc, in_hit_set,
+                                 pool.info.min_read_recency_for_promote,
+                                 promote_op);
+      }
       if (!promoted && !can_proxy_read) {
        // redirect the op if it's not proxied and not promoting
        do_cache_redirect(op);