From: Alex Ainscow Date: Wed, 11 Jun 2025 15:23:08 +0000 (+0100) Subject: osd: code clean up and debug in optimised EC X-Git-Tag: testing/wip-jcollin-testing-20250917.124222-tentacle~1^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ca31ad06f31bfeafa326e58fcec58198aa51a0b;p=ceph-ci.git osd: code clean up and debug in optimised EC Signed-off-by: Alex Ainscow (cherry picked from commit 1352868cec8d644e5fff68df7050c52bb4ed7e65) --- diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 112a65e85d4..0d429d5c230 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -386,8 +386,8 @@ void ECBackend::RecoveryBackend::handle_recovery_read_complete( } dout(20) << __func__ << ": oid=" << op.hoid << dendl; - dout(30) << __func__ << "EC_DEBUG_BUFFERS: " - << op.returned_data->debug_string(2048, 8) + dout(20) << __func__ << "EC_DEBUG_BUFFERS: " + << op.returned_data->debug_string(2048, 0) << dendl; continue_recovery_op(op, m); @@ -503,6 +503,14 @@ void ECBackend::RecoveryBackend::dispatch_recovery_messages( #if 1 if (!replies.empty()) { + dout(20) << __func__ << " recovery_transactions="; + Formatter *f = Formatter::create("json"); + f->open_object_section("t"); + m.t.dump(f); + f->close_section(); + f->flush(*_dout); + delete f; + *_dout << dendl; commit_txn_send_replies(std::move(m.t), std::move(replies)); } #endif @@ -1005,6 +1013,18 @@ void ECBackend::handle_sub_write( tls.reserve(2); tls.push_back(std::move(op.t)); tls.push_back(std::move(localt)); + dout(20) << __func__ << " queue_transactions="; + Formatter *f = Formatter::create("json"); + f->open_array_section("tls"); + for (ObjectStore::Transaction t: tls) { + f->open_object_section("t"); + t.dump(f); + f->close_section(); + } + f->close_section(); + f->flush(*_dout); + delete f; + *_dout << dendl; get_parent()->queue_transactions(tls, msg); dout(30) << __func__ << " missing after" << get_parent()->get_log(). get_missing(). diff --git a/src/osd/ECCommon.cc b/src/osd/ECCommon.cc index 377fd86452d..45f1a1c6909 100644 --- a/src/osd/ECCommon.cc +++ b/src/osd/ECCommon.cc @@ -481,8 +481,8 @@ struct ClientReadCompleter final : ECCommon::ReadCompleter { extent_map result; if (res.r == 0) { ceph_assert(res.errors.empty()); - dout(30) << __func__ << ": before decode: " - << res.buffers_read.debug_string(2048, 8) + dout(20) << __func__ << ": before decode: " + << res.buffers_read.debug_string(2048, 0) << dendl; /* Decode any missing buffers */ int r = res.buffers_read.decode(read_pipeline.ec_impl, @@ -490,8 +490,8 @@ struct ClientReadCompleter final : ECCommon::ReadCompleter { req.object_size, read_pipeline.get_parent()->get_dpp()); ceph_assert( r == 0 ); - dout(30) << __func__ << ": after decode: " - << res.buffers_read.debug_string(2048, 8) + dout(20) << __func__ << ": after decode: " + << res.buffers_read.debug_string(2048, 0) << dendl; for (auto &&read: req.to_read) { @@ -843,7 +843,7 @@ void ECCommon::RMWPipeline::finish_rmw(OpRef const &op) { dout(20) << __func__ << " op=" << *op << dendl; if (op->on_all_commit) { - dout(10) << __func__ << " Calling on_all_commit on " << op << dendl; + dout(10) << __func__ << " Calling on_all_commit on " << *op << dendl; op->on_all_commit->complete(0); op->on_all_commit = nullptr; op->trace.event("ec write all committed"); diff --git a/src/osd/ECTransaction.cc b/src/osd/ECTransaction.cc index 1142db8008f..6486e89521d 100644 --- a/src/osd/ECTransaction.cc +++ b/src/osd/ECTransaction.cc @@ -38,8 +38,8 @@ void debug(const hobject_t &oid, const std::string &str, const ECUtil::shard_extent_map_t &map, DoutPrefixProvider *dpp) { ldpp_dout(dpp, 20) << " generate_transactions: " << "oid: " << oid << str << map << dendl; - ldpp_dout(dpp, 30) - << "EC_DEBUG_BUFFERS: " << map.debug_string(2048, 8) << dendl; + ldpp_dout(dpp, 20) + << "EC_DEBUG_BUFFERS: " << map.debug_string(2048, 0) << dendl; } void ECTransaction::Generate::encode_and_write() {