You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by vm...@apache.org on 2019/04/24 21:20:56 UTC

[trafficserver] branch master updated: Revert RS-374 to avoid deadlocks

This is an automated email from the ASF dual-hosted git repository.

vmamidi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 6d55813  Revert RS-374 to avoid deadlocks
6d55813 is described below

commit 6d55813162a900cb3cc6d967695858da4ee8763c
Author: Vijay Mamidi <vi...@yahoo.com>
AuthorDate: Wed Apr 24 17:26:15 2019 +0800

    Revert RS-374 to avoid deadlocks
---
 iocore/hostdb/HostDB.cc | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index fc876bd..9f4110a 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -610,7 +610,6 @@ HostDBContinuation::insert(unsigned int attl)
 Action *
 HostDBProcessor::getby(Continuation *cont, cb_process_result_pfn cb_process_result, HostDBHash &hash, Options const &opt)
 {
-  bool trylock          = (cb_process_result == nullptr);
   bool force_dns        = false;
   EThread *thread       = this_ethread();
   Ptr<ProxyMutex> mutex = thread->mutex;
@@ -651,10 +650,6 @@ HostDBProcessor::getby(Continuation *cont, cb_process_result_pfn cb_process_resu
       // find the partition lock
       Ptr<ProxyMutex> bucket_mutex = hostDB.refcountcache->lock_for_key(hash.hash.fold());
       MUTEX_TRY_LOCK(lock2, bucket_mutex, thread);
-      if (!lock2.is_locked() && !trylock) {
-        // Refer to: [TS-374](http://issues.apache.org/jira/browse/TS-374)
-        lock2.acquire(thread);
-      }
       if (lock2.is_locked()) {
         // If we can get the lock and a level 1 probe succeeds, return
         Ptr<HostDBInfo> r = probe(bucket_mutex, hash, false);