forked from vitalif/vitastor
Allow empty global configuration, report OSD statistics faster
parent
21e06ea40d
commit
915d04c446
|
@ -253,7 +253,10 @@ class Mon
|
||||||
const res = await this.etcd_call('/kv/txn', { success: [
|
const res = await this.etcd_call('/kv/txn', { success: [
|
||||||
{ requestRange: { key: b64(this.etcd_prefix+'/config/global') } }
|
{ requestRange: { key: b64(this.etcd_prefix+'/config/global') } }
|
||||||
] }, this.etcd_start_timeout, -1);
|
] }, this.etcd_start_timeout, -1);
|
||||||
|
if (res.responses[0].response_range.kvs)
|
||||||
|
{
|
||||||
this.parse_kv(res.responses[0].response_range.kvs[0]);
|
this.parse_kv(res.responses[0].response_range.kvs[0]);
|
||||||
|
}
|
||||||
this.check_config();
|
this.check_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -384,6 +384,7 @@ void osd_t::create_osd_state()
|
||||||
{
|
{
|
||||||
st_cli.load_pgs();
|
st_cli.load_pgs();
|
||||||
}
|
}
|
||||||
|
report_statistics();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
uint64_t version = subop->reply.sec_rw.version;
|
||||||
#ifdef OSD_DEBUG
|
#ifdef OSD_DEBUG
|
||||||
uint64_t peer_osd = c_cli.clients.find(subop->peer_fd) != c_cli.clients.end()
|
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);
|
printf("subop %lu from osd %lu: version = %lu\n", opcode, peer_osd, version);
|
||||||
#endif
|
#endif
|
||||||
if (op_data->fact_ver != 0 && op_data->fact_ver != version)
|
if (op_data->fact_ver != 0 && op_data->fact_ver != version)
|
||||||
|
|
Loading…
Reference in New Issue