mirror of
https://github.com/nginx/nginx.git
synced 2024-12-13 11:09:06 +08:00
test cache path levels while reconfiguration
This commit is contained in:
parent
07b280a29f
commit
3210b282f5
@ -53,6 +53,7 @@ ngx_http_file_cache_init(ngx_shm_zone_t *shm_zone, void *data)
|
||||
ngx_http_file_cache_t *ocache = data;
|
||||
|
||||
size_t len;
|
||||
ngx_uint_t n;
|
||||
ngx_http_file_cache_t *cache;
|
||||
|
||||
cache = shm_zone->data;
|
||||
@ -68,6 +69,15 @@ ngx_http_file_cache_init(ngx_shm_zone_t *shm_zone, void *data)
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
for (n = 0; n < 3; n++) {
|
||||
if (cache->path->level[n] != ocache->path->level[n]) {
|
||||
ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0,
|
||||
"cache \"%V\" had previously different levels",
|
||||
&shm_zone->shm.name);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
cache->sh = ocache->sh;
|
||||
|
||||
cache->shpool = ocache->shpool;
|
||||
|
Loading…
Reference in New Issue
Block a user