diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 2de4b8308a7..c355d603fd5 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2147,11 +2147,13 @@ ReplicatedPG::cache_result_t ReplicatedPG::maybe_handle_cache_detail( return cache_result_t::BLOCKED_FULL; } - if (!hit_set && (must_promote || !op->need_skip_promote())) { + if (must_promote || (!hit_set && !op->need_skip_promote())) { promote_object(obc, missing_oid, oloc, op, promote_obc); return cache_result_t::BLOCKED_PROMOTE; - } else if (op->may_write() || op->may_cache()) { - if (can_proxy_write && !must_promote) { + } + + if (op->may_write() || op->may_cache()) { + if (can_proxy_write) { do_proxy_write(op, missing_oid); } else { // promote if can't proxy the write @@ -2169,7 +2171,7 @@ ReplicatedPG::cache_result_t ReplicatedPG::maybe_handle_cache_detail( return cache_result_t::HANDLED_PROXY; } else { bool did_proxy_read = false; - if (can_proxy_read && !must_promote) { + if (can_proxy_read) { do_proxy_read(op); did_proxy_read = true; } else {