]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: code clean up and debug in optimised EC
authorAlex Ainscow <aainscow@uk.ibm.com>
Wed, 11 Jun 2025 15:23:08 +0000 (16:23 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Sun, 7 Sep 2025 22:59:48 +0000 (23:59 +0100)
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
(cherry picked from commit 1352868cec8d644e5fff68df7050c52bb4ed7e65)

src/osd/ECBackend.cc
src/osd/ECCommon.cc
src/osd/ECTransaction.cc

index 112a65e85d4fa54b7f09b179b0c35d49583b2f55..0d429d5c2302caba173a7419677bb3836d8a33e2 100644 (file)
@@ -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().
index 377fd86452d547d8643685727fd7aab67fac8143..45f1a1c6909079795da3e295a91cc3afa1df2097 100644 (file)
@@ -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");
index 1142db8008f4a2911b342e41b8f05050d180bdb3..6486e89521df37c7ce5c09bf329e5f69ea4b945b 100644 (file)
@@ -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() {