]> git.kaiwu.me - nginx.git/commitdiff
Core: hash now ignores bucket_size if it hits max_size limit.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 31 Mar 2014 17:40:31 +0000 (21:40 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 31 Mar 2014 17:40:31 +0000 (21:40 +0400)
src/core/ngx_hash.c

index b532945027cbaadbbf5bc7097b2a02ba3751dad3..fe95693ab1b3d39e36ce32dfd4df6ebc642916f0 100644 (file)
@@ -312,15 +312,12 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts)
         continue;
     }
 
-    ngx_log_error(NGX_LOG_EMERG, hinit->pool->log, 0,
-                  "could not build the %s, you should increase "
-                  "either %s_max_size: %i or %s_bucket_size: %i",
+    ngx_log_error(NGX_LOG_WARN, hinit->pool->log, 0,
+                  "could not build optimal %s, you should increase "
+                  "either %s_max_size: %i or %s_bucket_size: %i; "
+                  "ignoring %s_bucket_size",
                   hinit->name, hinit->name, hinit->max_size,
-                  hinit->name, hinit->bucket_size);
-
-    ngx_free(test);
-
-    return NGX_ERROR;
+                  hinit->name, hinit->bucket_size, hinit->name);
 
 found: