if (h->cl)
return h->cl;
rpcc *cl = new rpcc(h->m);
- LOG("handler_mgr::acquire_handle trying to bind..." << h->m);
+ LOG("trying to bind..." << h->m);
// The test script assumes that the failure can be detected by paxos and
// rsm layer within few seconds. We have to set the timeout with a small
// value to support the assumption.
// With RPC_LOSSY=5, tests may fail due to delays and time outs.
int ret = cl->bind(rpcc::to(1000));
if (ret < 0) {
- LOG("handle_mgr::acquire_handle bind failure! " << h->m << " " << ret);
+ LOG("bind failure! " << h->m << " " << ret);
delete cl;
h->del = true;
} else {
- LOG("handle_mgr::acquire_handle bind succeeded " << h->m);
+ LOG("bind succeeded " << h->m);
h->cl = cl;
}
return h->cl;
if (hmap.find(m) == hmap.end()) {
h = new hinfo(m);
hmap[m] = h;
+ h->refcnt++;
} else if (!hmap[m]->del) {
h = hmap[m];
+ h->refcnt++;
}
- h->refcnt++;
return h;
}
void handle_mgr::delete_handle(const string & m, lock &) {
if (hmap.find(m) == hmap.end()) {
- LOG("handle_mgr::delete_handle: cl " << m << " isn't in cl list");
+ LOG("cl " << m << " isn't in cl list");
return;
}
- LOG("handle_mgr::delete_handle: cl " << m << " refcnt " << hmap[m]->refcnt);
+ LOG("cl " << m << " refcnt " << hmap[m]->refcnt);
hinfo *h = hmap[m];
if (h->refcnt == 0) {
if (h->cl) {