Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#42196 new defect (bug)

WP_Upgrader->unpack_package can't run in parallel

Reported by: sheldonh Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


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)

class-wp-upgrader.patch (1.1 KB) - added by sheldonh 3 years ago.
Demonstration of possible solution

Download all attachments as: .zip

Change History (2)

3 years ago

Demonstration of possible solution

#1 @sheldonh
3 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.

Note: See TracTickets for help on using tickets.