Project

General

Profile

Bug #10944 » 0002-Change-cond-wait-to-cond_timeout-wait-in-Client-make.patch

Zheng Yan, 07/08/2015 08:15 AM

View differences:

src/client/Client.cc
request->kick = false;
while (!request->reply && // reply
request->resend_mds < 0 && // forward
!request->kick)
caller_cond.Wait(client_lock);
!request->kick) {
utime_t w;
w.set_from_double(cct->_conf->client_request_timeout);
int ret_status = caller_cond.WaitInterval(cct, client_lock, w);
if (ret_status == ETIMEDOUT && !request->reply)
request->aborted = true;
}
request->caller_cond = NULL;
// did we get a reply?
if (request->reply)
if (request->reply)
break;
}
src/common/config_opts.h
OPTION(client_cache_size, OPT_INT, 16384)
OPTION(client_cache_mid, OPT_FLOAT, .75)
OPTION(client_use_random_mds, OPT_BOOL, false)
OPTION(client_request_timeout, OPT_DOUBLE, 120.0) // timeout for a single request to mds in seconds
OPTION(client_mount_timeout, OPT_DOUBLE, 300.0)
OPTION(client_tick_interval, OPT_DOUBLE, 1.0)
OPTION(client_trace, OPT_STR, "")
(2-2/3)