From: sajibreadd Date: Thu, 18 Apr 2024 09:38:02 +0000 (+0200) Subject: osd object store compaction on start wasn't working because of wrong boot sequence... X-Git-Tag: v20.0.0~925^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56980%2Fhead;p=ceph.git osd object store compaction on start wasn't working because of wrong boot sequence. More specifically compaction is called before authentication of monClient. Store compaction now is moved after authentication of monClient. Fixes: https://tracker.ceph.com/issues/65228 Signed-off-by: Md Mahamudur Rahaman Sajib --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index fb3a415a5420..ce46bb245ea2 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3930,11 +3930,6 @@ int OSD::init() dout(2) << "superblock: I am osd." << superblock.whoami << dendl; - if (cct->_conf.get_val("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("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();