Problem/Motivation
This is a follow-up of #2851529: DatabaseCacheTagsChecksum is misbehaving because of the static cache. Currently DbUpdateController::triggerBatch is only flushing all the caches and invalidating the container and relies on the fact that there will be a new request where the container will be newly build, however in order to unify the update process we should directly rebuild the container.
This is postponed on #2853152: drupal_rebuild should rebuild the container instead of invalidating it only in order to make it possible to get the new container in the same process/request.
Proposed resolution
After drupal_flush_all_caches rebuild the container explicitly in order to be clear that the container has to be rebuild before executing the post updates.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff-4-5.txt | 576 bytes | hchonov |
#6 | 2853153-5.patch | 1.63 KB | hchonov |
Comments
Comment #2
hchonovSomething like this.
Comment #3
tstoecklerInstead of requiring the file directly this should be added as
$batch['file']
so it is included before actually executing the operation.Comment #4
hchonovActually I think we could do it the same way as you've done in your pull request for drush and close the other issue. This is also only an improvement for better understanding the update process so I think it is a task and minor.
Comment #5
tstoecklerLooks good to me, but should probably be looked at by someone a bit more versed with the update / batch system.
Comment #6
hchonovI've added the interface by mistake.
Comment #8
hchonovHmm this is strange - the update tests are now failing. I thought there should be no difference if we rebuild the container in the request prior to the first post update or in the request of the first post update.
Comment #13
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@hchonov, do you still think this should be done or can we close it?
Comment #14
hchonov@amateescu, I don't think that it is necessary. The only reason for rebuilding the container explicitly would be for consistency with the accepted change in Drush. See https://github.com/drush-ops/drush/pull/2620/files
However I don't have strong opinion about this and if someone considers this an unnecessary change, then the issue can be closed.
Comment #15
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedOk, let's close it then. Our update path tests are quite sensitive to container rebuilds (as discovered in #3006086: update.php should not process path aliases), so let's not try to fix something that works :)