trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wei...@apache.org
Subject git commit: TS-1653 we should not retry dns lookup after timeout happens
Date Wed, 06 Feb 2013 08:33:51 GMT
Updated Branches:
  refs/heads/master 7fd61b356 -> bc7a84441


TS-1653 we should not retry dns lookup after timeout happens


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/bc7a8444
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bc7a8444
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bc7a8444

Branch: refs/heads/master
Commit: bc7a84441ca1d6c13d1117b9515c879c70cf9d3b
Parents: 7fd61b3
Author: weijin <taorui.wj@taobao.com>
Authored: Wed Feb 6 16:32:14 2013 +0800
Committer: weijin <taorui.wj@taobao.com>
Committed: Wed Feb 6 16:32:14 2013 +0800

----------------------------------------------------------------------
 CHANGES                 |    2 ++
 iocore/hostdb/HostDB.cc |   15 ++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bc7a8444/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index f7076c9..468cb5c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.3.1
 
+  *) [TS-1653] prevent the crash that retry dns lookup after timeout
+
   *) [TS-1006] memory management, cut down memory usage
      Author: Yunkai Zhang <qiushu.zyk@taobao.com>
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bc7a8444/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index db3c6e3..1d9ef72 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1560,16 +1560,17 @@ HostDBContinuation::dnsEvent(int event, HostEnt * e)
       do_put_response(m, r, NULL);
 #endif
 
-    // Check for IP family failover
-    if (failed && check_for_retry(md5.db_mark, host_res_style)) {
-      this->refresh_MD5();
-      SET_CONTINUATION_HANDLER(this, (HostDBContHandler) & HostDBContinuation::probeEvent);
-      thread->schedule_in(this, MUTEX_RETRY_DELAY);
-      return EVENT_CONT;
-    }
     // try to callback the user
     //
     if (action.continuation) {
+      // Check for IP family failover
+      if (failed && check_for_retry(md5.db_mark, host_res_style)) {
+        this->refresh_MD5();
+        SET_CONTINUATION_HANDLER(this, (HostDBContHandler) & HostDBContinuation::probeEvent);
+        thread->schedule_in(this, MUTEX_RETRY_DELAY);
+        return EVENT_CONT;
+      }
+
       MUTEX_TRY_LOCK_FOR(lock, action.mutex, thread, action.continuation);
       if (!lock) {
         remove_trigger_pending_dns();


Mime
View raw message