Implement regular automatic syncs, split osd_t constructor into some methods

This commit is contained in:
Vitaliy Filippov
2020-04-02 22:16:46 +03:00
parent 0f43f6d3f6
commit afe2e76c87
5 changed files with 147 additions and 78 deletions
+7
View File
@@ -31,6 +31,13 @@ void osd_t::init_primary()
pgs[1].print_state();
pg_count = 1;
peering_state = OSD_CONNECTING_PEERS;
if (autosync_interval > 0)
{
this->sync_tfd = new timerfd_interval(ringloop, 3, [this]()
{
autosync();
});
}
}
osd_peer_def_t osd_t::parse_peer(std::string peer)