[3] Ensure opcache file invalidate on file copy & delete#32918
Closed
PhilETaylor wants to merge 6 commits intojoomla:stagingfrom
PhilETaylor:opcacheonwrite3
Closed
[3] Ensure opcache file invalidate on file copy & delete#32918PhilETaylor wants to merge 6 commits intojoomla:stagingfrom PhilETaylor:opcacheonwrite3
PhilETaylor wants to merge 6 commits intojoomla:stagingfrom
PhilETaylor:opcacheonwrite3
Conversation
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
Member
|
@PhilETaylor Unit tests failing: |
richard67
reviewed
Mar 29, 2021
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
This comment was marked as abuse.
This comment was marked as abuse.
Member
|
@PhilETaylor Did his thumb down come before or after the isset check was added? If before, then it maybe was that. |
This comment was marked as abuse.
This comment was marked as abuse.
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
|
Set to "closed" on behalf of @SharkyKZ by The JTracker Application at issues.joomla.org/joomla-cms/32918 |
Member
|
For further discussion I've decided to comment in the J4 PR #32915 . |
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
This comment was marked as abuse.
This comment was marked as abuse.
added 2 commits
April 3, 2021 14:44
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
Signed-off-by: Phil E. Taylor <phil@phil-taylor.com>
This comment was marked as abuse.
This comment was marked as abuse.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part 2 of #32592 and directed at Joomla 3
Summary of Changes
When PHP is configured to use modern Opcache, PHP will attempt to hold the compiled version cached in memory.
There are many ways to configure opcache invalidations, including never revisiting the source PHP to compile it again ever (if opcache.validate_timestamps is disabled for example)
To fully ensure that files that Joomla writes to the hard disk are taken into account by a server with a correct configured (or badly configured) opcache, we need to invalidate files from the opcache after writing a new version to the disk.
Joomla has previously used
opcache_resetto do this, but its clear this is not good enough.Testing Instructions
Hard to test unless you really know what you are doing and can reconfigure all your PHP stack to include opcaching. Also some of the edge cases this fixes will only become clear if you are an extension developer mass distributing extensions.
Install some extensions - nothing should break.
Actual result BEFORE applying this Pull Request
You can install extensions
Expected result AFTER applying this Pull Request
You can install extensions and opcache for each file is invalidated
Documentation Changes Required
none
// cc @nikosdion