Opened 7 years ago
Last modified 5 years ago
#42196 new defect (bug)
WP_Upgrader->unpack_package can't run in parallel
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | |
Focuses: | Cc: |
Description
Although WP_Upgrader->unpack_package
takes care to assign a unique $working_dir
for the package being unpacked, it recursively deletes the contents of $upgrade_folder
before it does its work.
Since $upgrade_folder
is the parent of $working_dir
, concurrent unpack_package
calls interfere with each other. In particular, this defeats parallel wp theme install
; one install is likely to encounter ENOENT
while trying to copy it unpacked files out of $working_dir
.
Attachments (1)
Change History (4)
#1
@
7 years ago
I know next to nothing about WordPress or PHP, but I've uploaded a patch that at least demonstrates a possible solution. With the patch applied, I can run multiple wp theme install
commands in parallel.
This ticket was mentioned in Slack in #core by markparnell. View the logs.
5 years ago
#3
@
5 years ago
- Component changed from General to Upgrade/Install
Hi @sheldonh, thanks for the report and sorry it's taken so long for anyone to respond! I don't know enough about the WP_Upgrader
class to be of much help here, but I'm moving this to the Upgrade/Install
component where it will be more likely to attract the attention of those who do.
Demonstration of possible solution