Skip to content

Commit eda7eee

Browse files
committed
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 <[email protected]>
1 parent a1cd410 commit eda7eee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/osd/OSD.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3930,11 +3930,6 @@ int OSD::init()
39303930

39313931
dout(2) << "superblock: I am osd." << superblock.whoami << dendl;
39323932

3933-
if (cct->_conf.get_val<bool>("osd_compact_on_start")) {
3934-
dout(2) << "compacting object store's DB" << dendl;
3935-
store->compact();
3936-
}
3937-
39383933
// prime osd stats
39393934
{
39403935
struct store_statfs_t stbuf;
@@ -4080,6 +4075,11 @@ int OSD::init()
40804075
if (is_stopping())
40814076
return 0;
40824077

4078+
if (cct->_conf.get_val<bool>("osd_compact_on_start")) {
4079+
dout(2) << "compacting object store's DB" << dendl;
4080+
store->compact();
4081+
}
4082+
40834083
// start objecter *after* we have authenticated, so that we don't ignore
40844084
// the OSDMaps it requests.
40854085
service.final_init();

0 commit comments

Comments
 (0)