Updated Branches: refs/heads/master 95ff29ec6 -> ba3b7d023
TS-374 Changed the retry to use HOST_DB_RETRY_PERIOD (2ms) and switch the locking from a trylock to a lock. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ba3b7d02 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ba3b7d02 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ba3b7d02 Branch: refs/heads/master Commit: ba3b7d023577e33a93cc038ad64f41781633424a Parents: 95ff29e Author: Bryan Call <[email protected]> Authored: Thu May 16 11:01:37 2013 -0700 Committer: Bryan Call <[email protected]> Committed: Thu May 16 11:01:37 2013 -0700 ---------------------------------------------------------------------- iocore/hostdb/HostDB.cc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ba3b7d02/iocore/hostdb/HostDB.cc ---------------------------------------------------------------------- diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc index 51f58a4..4de46c4 100644 --- a/iocore/hostdb/HostDB.cc +++ b/iocore/hostdb/HostDB.cc @@ -995,7 +995,7 @@ HostDBProcessor::getbyname_imm(Continuation * cont, process_hostdb_info_pfn proc loop = false; // loop only on explicit set for retry // find the partition lock ProxyMutex *bucket_mutex = hostDB.lock_for_bucket((int) (fold_md5(md5.hash) % hostDB.buckets)); - MUTEX_TRY_LOCK(lock, bucket_mutex, thread); + MUTEX_LOCK(lock, bucket_mutex, thread); if (lock) { // If we can get the lock do a level 1 probe for immediate result. @@ -1028,7 +1028,7 @@ HostDBProcessor::getbyname_imm(Continuation * cont, process_hostdb_info_pfn proc c->init(md5, copt); SET_CONTINUATION_HANDLER(c, (HostDBContHandler) & HostDBContinuation::probeEvent); - thread->schedule_in(c, MUTEX_RETRY_DELAY); + thread->schedule_in(c, HOST_DB_RETRY_PERIOD); return &c->action; }
