]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PGLog: allow pg log trim when complete_to is less than trim_to
authorNeha Ojha <nojha@redhat.com>
Tue, 17 Jul 2018 01:11:27 +0000 (18:11 -0700)
committerNeha Ojha <nojha@redhat.com>
Mon, 23 Jul 2018 19:40:11 +0000 (15:40 -0400)
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit a5329ba8dd169e55deaff47d042354e53d8e722d)

Conflicts:
src/osd/PGLog.cc: Now it is possible to have complete_to version
        less than or equal to trim version, because the pg log length upper
        limit is a hard limit, and trim can proceed even when there is
        pending recovery/backfill. So do not complain when this happens.

src/osd/PGLog.cc

index b384a2cdd6567b3deb928fce704276d7159dbf0f..30152539f0a65771e96096ea4933b7262e249249 100644 (file)
@@ -50,15 +50,8 @@ void PGLog::IndexedLog::trim(
   set<string>* trimmed_dups,
   eversion_t *write_from_dups)
 {
-  if (complete_to != log.end() &&
-      complete_to->version <= s) {
-    generic_dout(0) << " bad trim to " << s << " when complete_to is "
-                   << complete_to->version
-                   << " on " << *this << dendl;
-  }
-
   assert(s <= can_rollback_to);
-  generic_dout(0) << " complete_to " << complete_to->version << dendl;
+  generic_dout(20) << " complete_to " << complete_to->version << dendl;
 
   auto earliest_dup_version =
     log.rbegin()->version.version < cct->_conf->osd_pg_log_dups_tracked