Allow empty global configuration, report OSD statistics faster

Vitaliy Filippov 2 years ago
parent 21e06ea40d
commit 915d04c446
  1. 5
      mon/mon.js
  2. 1
      osd_cluster.cpp
  3. 2
      osd_primary_subops.cpp

@ -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();
}

@ -384,6 +384,7 @@ void osd_t::create_osd_state()
{
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;
#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)

Loading…
Cancel
Save