From 13b9df16d04c81ba67bbc80b14e0de80b318b0f8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 17 Mar 2018 11:20:06 -0500 Subject: [PATCH] osd/ECBackend: do not op_applied on zero at_version for dummy rollforward transaction The dummy rollforward transactions have at_version=0'0; do not call op_applied on those. This ensures that the op_applied call Signed-off-by: Sage Weil --- src/osd/ECBackend.cc | 5 ++++- src/osd/PrimaryLogPG.cc | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 874727f1cf197..6e92775009b5b 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -929,7 +929,10 @@ void ECBackend::handle_sub_write( tls.push_back(std::move(op.t)); tls.push_back(std::move(localt)); get_parent()->queue_transactions(tls, msg); - get_parent()->op_applied(op.at_version); + if (op.at_version != eversion_t()) { + // dummy rollforward transaction doesn't get at_version (and doesn't advance it) + get_parent()->op_applied(op.at_version); + } } void ECBackend::handle_sub_read( diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index e32df9eb32d57..bc27e844c24a0 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -9930,6 +9930,7 @@ void PrimaryLogPG::repop_all_committed(RepGather *repop) void PrimaryLogPG::op_applied(const eversion_t &applied_version) { dout(10) << "op_applied version " << applied_version << dendl; + assert(applied_version != eversion_t()); assert(applied_version <= info.last_update); last_update_applied = applied_version; if (is_primary()) { -- 2.39.5