]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1919. [bug] The cache memory context array was too small to
authorMark Andrews <marka@isc.org>
Wed, 28 Sep 2005 04:42:50 +0000 (04:42 +0000)
committerMark Andrews <marka@isc.org>
Wed, 28 Sep 2005 04:42:50 +0000 (04:42 +0000)
                        have the desired performance characteristics.
                        [RT #15454]

stop.pl Increase amount of time allowed for named to stop before aborting the
server.

CHANGES
bin/tests/system/stop.pl
lib/dns/rbtdb.c

diff --git a/CHANGES b/CHANGES
index c026639a4d53cd69296bbf87d7a78d738cfb73bd..92b9108b4e86e95427725817b88ebb9d21838f2f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1919.  [bug]           The cache memory context array was too small to
+                       have the desired performance characteristics.
+                       [RT #15454]
 
        --- 9.4.0a1 released ---
 
index aedd5cc8ade4f3d793d17eb528981675db6dd687..4ee60b8afa1fcf2f65ef645442d9d2c87ef0b488 100644 (file)
@@ -15,7 +15,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: stop.pl,v 1.6 2004/03/05 04:59:13 marka Exp $
+# $Id: stop.pl,v 1.6.18.1 2005/09/28 04:42:49 marka Exp $
 
 # Framework for stopping test servers
 # Based on the type of server specified, signal the server to stop, wait
@@ -80,7 +80,7 @@ if ($use_rndc) {
                stop_rndc($server);
        }
 
-       wait_for_servers(5, grep /^ns/, @servers);
+       wait_for_servers(30, grep /^ns/, @servers);
 }
 
 
@@ -88,8 +88,8 @@ if ($use_rndc) {
 foreach my $server (@servers) {
        stop_signal($server, "TERM");
 }
-wait_for_servers(5, @servers);
 
+wait_for_servers(60, @servers);
 
 # Pass 3: SIGABRT
 foreach my $server (@servers) {
index 2e049dc91c5d7b7a3a33b4ce77cb9d35b5ac3934..8d52b128d954915aa91d4b42498df18f98a20671 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbtdb.c,v 1.196.18.19 2005/09/20 04:33:46 marka Exp $ */
+/* $Id: rbtdb.c,v 1.196.18.20 2005/09/28 04:42:50 marka Exp $ */
 
 /*! \file */
 
@@ -280,7 +280,8 @@ struct acachectl {
 #define NXDOMAIN(header) \
        (((header)->attributes & RDATASET_ATTR_NXDOMAIN) != 0)
 
-#define DEFAULT_NODE_LOCK_COUNT                7               /*%< Should be prime. */
+#define DEFAULT_NODE_LOCK_COUNT                7       /*%< Should be prime. */
+#define DEFAULT_CACHE_NODE_LOCK_COUNT  1009    /*%< Should be prime. */
 
 typedef struct {
        nodelock_t                      lock;
@@ -594,7 +595,7 @@ adjust_quantum(unsigned int old, isc_time_t *start) {
        new = (new + old * 3) / 4;
        
        isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
-                     ISC_LOG_INFO, "adjust_quantum -> %d\n", new);
+                     ISC_LOG_INFO, "adjust_quantum -> %d", new);
 
        return (new);
 }
@@ -5535,10 +5536,13 @@ dns_rbtdb_create
        if (result != ISC_R_SUCCESS)
                goto cleanup_lock;
 
+       if (rbtdb->node_lock_count == 0) {
+               if (IS_CACHE(rbtdb))
+                       rbtdb->node_lock_count = DEFAULT_CACHE_NODE_LOCK_COUNT;
+               else
+                       rbtdb->node_lock_count = DEFAULT_NODE_LOCK_COUNT;
+       }
        INSIST(rbtdb->node_lock_count < (1 << DNS_RBT_LOCKLENGTH));
-
-       if (rbtdb->node_lock_count == 0)
-               rbtdb->node_lock_count = DEFAULT_NODE_LOCK_COUNT;
        rbtdb->node_locks = isc_mem_get(mctx, rbtdb->node_lock_count *
                                        sizeof(rbtdb_nodelock_t));
        if (rbtdb->node_locks == NULL) {