]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "osd: handle trim() during backfill"
authorNeha Ojha <nojha@redhat.com>
Fri, 2 Nov 2018 23:50:38 +0000 (19:50 -0400)
committerNeha Ojha <nojha@redhat.com>
Fri, 2 Nov 2018 23:50:38 +0000 (19:50 -0400)
This reverts commit bdfc2a3b4fa8038ade31ccab5f5479508e9afff3.

Signed-off-by: Neha Ojha <nojha@redhat.com>
src/osd/PG.cc
src/osd/PGLog.cc
src/osd/PGLog.h

index 7dfa1a95adbaee5b476585ad6302b570751227f0..9ad076649575d026a561b6d61a5e1376ba55beb8 100644 (file)
@@ -3460,12 +3460,7 @@ void PG::append_log(
 
   dout(10) << __func__ << " approx pg log length =  "
            << pg_log.get_log().approx_size() << dendl;
-  dout(10) << __func__ << " transaction_applied = "
-           << transaction_applied << dendl;
-  if (!transaction_applied)
-    dout(10) << __func__ << " " << pg_whoami
-             << " is backfill target" << dendl;
-  pg_log.trim(trim_to, info, transaction_applied);
+  pg_log.trim(trim_to, info);
 
   // update the local pg, pg log
   dirty_info = true;
index 8148f57a152c5bdbf91cec637eadb2e551a98431..80e159308499fb1b7acb25c2e0202e37110814f5 100644 (file)
@@ -162,15 +162,13 @@ void PGLog::clear_info_log(
 
 void PGLog::trim(
   eversion_t trim_to,
-  pg_info_t &info,
-  bool transaction_applied)
+  pg_info_t &info)
 {
   dout(10) << __func__ << " proposed trim_to = " << trim_to << dendl;
   // trim?
   if (trim_to > log.tail) {
-    // Don't assert for backfill_targets
-    if (transaction_applied)
-      assert(trim_to <= info.last_complete);
+    // We shouldn't be trimming the log past last_complete
+    assert(trim_to <= info.last_complete);
 
     dout(10) << "trim " << log << " to " << trim_to << dendl;
     log.trim(cct, trim_to, &trimmed, &trimmed_dups, &write_from_dups);
index 6f85ee1f1a5505cc6585c0d1b55332f810cabbea..7253936ddcfa6f718258647d9590fed3222e92c7 100644 (file)
@@ -705,8 +705,7 @@ public:
 
   void trim(
     eversion_t trim_to,
-    pg_info_t &info,
-    bool transaction_applied = true);
+    pg_info_t &info);
 
   void roll_forward_to(
     eversion_t roll_forward_to,