mirror of
https://github.com/nginx/nginx.git
synced 2025-06-16 00:21:02 +08:00
change order
This commit is contained in:
parent
2108fabea2
commit
c7b2e2a570
@ -1022,19 +1022,17 @@ ngx_http_file_cache_forced_expire(ngx_http_file_cache_t *cache)
|
|||||||
fcn->count, fcn->exists,
|
fcn->count, fcn->exists,
|
||||||
fcn->key[0], fcn->key[1], fcn->key[2], fcn->key[3]);
|
fcn->key[0], fcn->key[1], fcn->key[2], fcn->key[3]);
|
||||||
|
|
||||||
if (fcn->count) {
|
if (fcn->count == 0) {
|
||||||
|
ngx_http_file_cache_delete(cache, q, name);
|
||||||
|
|
||||||
|
} else {
|
||||||
if (tries++ < 20) {
|
if (tries++ < 20) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
wait = 1;
|
wait = 1;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_http_file_cache_delete(cache, q, name);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1097,11 +1095,13 @@ ngx_http_file_cache_expire(ngx_http_file_cache_t *cache)
|
|||||||
fcn->count, fcn->exists,
|
fcn->count, fcn->exists,
|
||||||
fcn->key[0], fcn->key[1], fcn->key[2], fcn->key[3]);
|
fcn->key[0], fcn->key[1], fcn->key[2], fcn->key[3]);
|
||||||
|
|
||||||
if (fcn->count) {
|
if (fcn->count == 0) {
|
||||||
|
ngx_http_file_cache_delete(cache, q, name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
p = ngx_hex_dump(key, (u_char *) &fcn->node.key,
|
p = ngx_hex_dump(key, (u_char *) &fcn->node.key,
|
||||||
sizeof(ngx_rbtree_key_t));
|
sizeof(ngx_rbtree_key_t));
|
||||||
|
|
||||||
len = NGX_HTTP_CACHE_KEY_LEN - sizeof(ngx_rbtree_key_t);
|
len = NGX_HTTP_CACHE_KEY_LEN - sizeof(ngx_rbtree_key_t);
|
||||||
(void) ngx_hex_dump(p, fcn->key, len);
|
(void) ngx_hex_dump(p, fcn->key, len);
|
||||||
|
|
||||||
@ -1118,11 +1118,6 @@ ngx_http_file_cache_expire(ngx_http_file_cache_t *cache)
|
|||||||
ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
|
ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
|
||||||
"ignore long locked inactive cache entry %*s, count:%d",
|
"ignore long locked inactive cache entry %*s, count:%d",
|
||||||
2 * NGX_HTTP_CACHE_KEY_LEN, key, fcn->count);
|
2 * NGX_HTTP_CACHE_KEY_LEN, key, fcn->count);
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ngx_http_file_cache_delete(cache, q, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_shmtx_unlock(&cache->shpool->mutex);
|
ngx_shmtx_unlock(&cache->shpool->mutex);
|
||||||
|
Loading…
Reference in New Issue
Block a user