mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Check if restart is pending before trying to lock SHM
This reduces lock contention when Opcache restart is scheduled but not yet started. Closes GH-11805
This commit is contained in:
parent
b5f8a7270a
commit
3e9792f4a2
2 changed files with 3 additions and 0 deletions
2
NEWS
2
NEWS
|
@ -21,6 +21,8 @@ PHP NEWS
|
||||||
- Opcache:
|
- Opcache:
|
||||||
. Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or
|
. Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or
|
||||||
opcache_get_status() / phpinfo() is wrong). (nielsdos)
|
opcache_get_status() / phpinfo() is wrong). (nielsdos)
|
||||||
|
. Avoid adding an unnecessary read-lock when loading script from shm if
|
||||||
|
restart is in progress. (mikhainin)
|
||||||
|
|
||||||
- Standard:
|
- Standard:
|
||||||
. Prevent int overflow on $decimals in number_format. (Marc Bennewitz)
|
. Prevent int overflow on $decimals in number_format. (Marc Bennewitz)
|
||||||
|
|
|
@ -1786,6 +1786,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl
|
||||||
|
|
||||||
if (!file_cache_only &&
|
if (!file_cache_only &&
|
||||||
!ZCSG(restart_in_progress) &&
|
!ZCSG(restart_in_progress) &&
|
||||||
|
!ZCSG(restart_pending) &&
|
||||||
!ZSMMG(memory_exhausted) &&
|
!ZSMMG(memory_exhausted) &&
|
||||||
accelerator_shm_read_lock() == SUCCESS) {
|
accelerator_shm_read_lock() == SUCCESS) {
|
||||||
/* exclusive lock */
|
/* exclusive lock */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue