Allow empty global configuration, report OSD statistics faster

This commit is contained in:
Vitaliy Filippov
2021-02-01 19:31:10 +03:00
parent 21e06ea40d
commit 915d04c446
3 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -253,7 +253,10 @@ class Mon
const res = await this.etcd_call('/kv/txn', { success: [
{ requestRange: { key: b64(this.etcd_prefix+'/config/global') } }
] }, this.etcd_start_timeout, -1);
this.parse_kv(res.responses[0].response_range.kvs[0]);
if (res.responses[0].response_range.kvs)
{
this.parse_kv(res.responses[0].response_range.kvs[0]);
}
this.check_config();
}
+1
View File
@@ -384,6 +384,7 @@ void osd_t::create_osd_state()
{
st_cli.load_pgs();
}
report_statistics();
});
}
+1 -1
View File
@@ -295,7 +295,7 @@ void osd_t::handle_primary_subop(osd_op_t *subop, osd_op_t *cur_op)
uint64_t version = subop->reply.sec_rw.version;
#ifdef OSD_DEBUG
uint64_t peer_osd = c_cli.clients.find(subop->peer_fd) != c_cli.clients.end()
? c_cli.clients[subop->peer_fd].osd_num : osd_num;
? c_cli.clients[subop->peer_fd]->osd_num : osd_num;
printf("subop %lu from osd %lu: version = %lu\n", opcode, peer_osd, version);
#endif
if (op_data->fact_ver != 0 && op_data->fact_ver != version)