This repository was archived by the owner on May 16, 2018. It is now read-only.
Commit 1688f3d
committed
Fix ZF-11921: Race condition in plugin loader include file cache
This fixes the race condition described at:
http://framework.zend.com/issues/browse/ZF-11921
For the race to disappear each and every line is made completely independent from the others. This is the reason why every line includes its own php open and close tag, and no file_get_content() is made, and the file is opened in append only mode.
To prevent the insertion of duplicates lines, a fast non blocking lock is made and kept until the end of the request, thus the static $h.
Tested on a highly concurrent server without a problem.1 parent 1474ec6 commit 1688f3d
1 file changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
484 | 487 | | |
485 | | - | |
486 | | - | |
487 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
488 | 492 | | |
489 | 493 | | |
490 | 494 | | |
0 commit comments