Skip to content

Follow-up on "Support multiple workers for NODEFS /wordpress mounts" #2293

Open
@brandonpayton

Description

@brandonpayton

We are in the midst of merging a number of large PRs:

In order to keep things moving, we merged #2231 while it still had some rough edges. This is an issue to follow up on those:

  • Find way to stop skipping run-cli tests
  • Find way to use normal test setup for test-built-npm-packages
  • Fix Asyncify sqlite tests so we can stop skipping them
  • Complete multi-worker support with Asyncify
  • Consider using bootRequestHandler() instead of bootWordPress() after booting the first worker.
  • Make sure error logs are collected from the correct worker and/or consolidated when needed.
  • Consider alternate load balancing approach, perhaps "a moving average of total idle time per minute as a decent proxy metric"
  • Look at unifying multi-worker management with PHP process management. We don't want to have to be aware of where or how PHP is running. Consider whether php-fpm or something like it is appropriate.
  • Drop topOfStack testing from php-asyncify-sqlite3.spec.ts
  • Use native fcntl for fcntl-style locks.
  • Implement the two missing file-lock-manager test cases
  • Support sharing flock-based locks with forked processes.
  • Remove unnecessary nativeNodeModulesPlugin from php-wasm/node/build.js
  • Reconcile js_getpid() with facilities we ship in the base emscripten js library. If the two don't have much overlap, let's at least acknowledge the other one in a comment. There may be some overlap, though, as proc_open can spawn a php process.
  • Return an error from get_native_path_from_vfs_path() if no native path is found and make sure callers handle that.
  • Make sure get_vfs_path_from_fd() doesn't abuse or mistakenly use a native /proc dir if exposed by useHostFilesystem().
  • For node-es-module-loader ?url import handling, grep by /@fs and see if there's any impact on matching of vite paths with .href vs .pathname. If not, we're good.
  • Look at the getpid() override and the proc_open() process ID management and make sure there are no conflicts between them.
  • Confirm safety of node lookup in locking.is_path_to_shared_fs(). Do not assume successful lookup.
  • Should --experimentalMultiWorker be a hidden CLI option?
  • Remove duplicates from ASYNCIFY_IMPORTS lists
  • Run performance test of multi-worker setup
  • Make fcntl and flock overrides conditional on existence of PHPLoader.fileLockManager

Relevant but out of scope

  • Consider how to stop GH actions killing tests without using so many runners to split unit tests

TODO: Add more items from #2231 review comments

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions