]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd object store compaction on start wasn't working because of wrong boot sequence... 56980/head
authorsajibreadd <sajibreadd@gmail.com>
Thu, 18 Apr 2024 09:38:02 +0000 (11:38 +0200)
committersajibreadd <sajibreadd@gmail.com>
Mon, 2 Sep 2024 14:21:37 +0000 (20:21 +0600)
Fixes: https://tracker.ceph.com/issues/65228
Signed-off-by: Md Mahamudur Rahaman Sajib <mahamudur.sajib@croit.io>
src/osd/OSD.cc

index fb3a415a54204a6ca46cda56e46d1e804f4750a3..ce46bb245ea2c7746cc1978f9b74108e4aa9ea90 100644 (file)
@@ -3930,11 +3930,6 @@ int OSD::init()
 
   dout(2) << "superblock: I am osd." << superblock.whoami << dendl;
 
-  if (cct->_conf.get_val<bool>("osd_compact_on_start")) {
-    dout(2) << "compacting object store's DB" << dendl;
-    store->compact();
-  }
-
   // prime osd stats
   {
     struct store_statfs_t stbuf;
@@ -4080,6 +4075,11 @@ int OSD::init()
   if (is_stopping())
     return 0;
 
+  if (cct->_conf.get_val<bool>("osd_compact_on_start")) {
+    dout(2) << "compacting object store's DB" << dendl;
+    store->compact();
+  }
+
   // start objecter *after* we have authenticated, so that we don't ignore
   // the OSDMaps it requests.
   service.final_init();