From 24dbc031a068e9b5129dd4291cdebf6eb3c650ae Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 10 Dec 2020 16:53:44 -0500 Subject: [PATCH 01/12] lib,src: update cluster to use Parent Doc deprecate isMaster and setupMaster in favor of isParent and setupParent. Signed-off-by: Michael Dawson --- doc/api/cluster.md | 120 ++++++++++-------- doc/api/dgram.md | 2 +- doc/api/domain.md | 12 +- lib/cluster.js | 4 +- lib/dgram.js | 6 +- lib/internal/child_process.js | 2 +- lib/internal/cluster/child.js | 21 +-- lib/internal/cluster/{master.js => parent.js} | 16 ++- lib/internal/cluster/worker.js | 2 +- lib/net.js | 12 +- node.gyp | 2 +- test/async-hooks/test-callback-error.js | 2 +- test/common/index.js | 2 +- test/fixtures/cluster-preload-test.js | 2 +- test/fixtures/cluster-preload.js | 2 +- test/fixtures/clustered-server/app.js | 2 +- ...st-dgram-bind-shared-ports-after-port-0.js | 4 +- .../test-inspector-cluster-port-clash.js | 2 +- ...ld-process-fork-closed-channel-segfault.js | 4 +- .../test-child-process-recv-handle.js | 4 +- test/parallel/test-child-process-silent.js | 4 +- .../test-cluster-advanced-serialization.js | 2 +- test/parallel/test-cluster-basic.js | 2 +- .../test-cluster-bind-privileged-port.js | 2 +- test/parallel/test-cluster-bind-twice.js | 6 +- .../parallel/test-cluster-call-and-destroy.js | 2 +- .../test-cluster-concurrent-disconnect.js | 2 +- test/parallel/test-cluster-cwd.js | 4 +- test/parallel/test-cluster-dgram-1.js | 8 +- test/parallel/test-cluster-dgram-2.js | 8 +- test/parallel/test-cluster-dgram-bind-fd.js | 8 +- test/parallel/test-cluster-dgram-ipv6only.js | 2 +- test/parallel/test-cluster-dgram-reuse.js | 2 +- .../test-cluster-disconnect-before-exit.js | 2 +- ...r-disconnect-exitedAfterDisconnect-race.js | 2 +- .../test-cluster-disconnect-idle-worker.js | 2 +- test/parallel/test-cluster-disconnect-leak.js | 2 +- test/parallel/test-cluster-disconnect-race.js | 2 +- .../test-cluster-disconnect-unshared-tcp.js | 2 +- .../test-cluster-disconnect-unshared-udp.js | 2 +- test/parallel/test-cluster-disconnect.js | 2 +- test/parallel/test-cluster-eaccess.js | 12 +- test/parallel/test-cluster-eaddrinuse.js | 2 +- test/parallel/test-cluster-fork-env.js | 2 +- test/parallel/test-cluster-fork-stdio.js | 4 +- .../parallel/test-cluster-fork-windowsHide.js | 10 +- test/parallel/test-cluster-http-pipe.js | 2 +- test/parallel/test-cluster-invalid-message.js | 2 +- test/parallel/test-cluster-ipc-throw.js | 2 +- test/parallel/test-cluster-kill-disconnect.js | 2 +- .../test-cluster-kill-infinite-loop.js | 2 +- test/parallel/test-cluster-listening-port.js | 2 +- test/parallel/test-cluster-message.js | 12 +- .../test-cluster-net-listen-ipv6only-false.js | 2 +- .../test-cluster-net-listen-relative-path.js | 2 +- test/parallel/test-cluster-net-listen.js | 2 +- test/parallel/test-cluster-net-send.js | 2 +- ...-error.js => test-cluster-parent-error.js} | 8 +- ...er-kill.js => test-cluster-parent-kill.js} | 12 +- .../test-cluster-process-disconnect.js | 2 +- .../parallel/test-cluster-rr-domain-listen.js | 2 +- test/parallel/test-cluster-rr-ref.js | 2 +- test/parallel/test-cluster-send-deadlock.js | 6 +- .../test-cluster-send-handle-twice.js | 2 +- ...uster-send-socket-to-worker-http-server.js | 2 +- .../test-cluster-server-restart-none.js | 2 +- .../test-cluster-server-restart-rr.js | 2 +- .../test-cluster-setup-master-argv.js | 2 +- .../test-cluster-setup-master-cumulative.js | 12 +- .../test-cluster-setup-master-emit.js | 6 +- .../test-cluster-setup-master-multiple.js | 6 +- test/parallel/test-cluster-setup-master.js | 6 +- .../test-cluster-shared-handle-bind-error.js | 4 +- ...ster-shared-handle-bind-privileged-port.js | 4 +- test/parallel/test-cluster-shared-leak.js | 2 +- .../test-cluster-uncaught-exception.js | 8 +- test/parallel/test-cluster-worker-death.js | 2 +- test/parallel/test-cluster-worker-destroy.js | 4 +- ...test-cluster-worker-disconnect-on-error.js | 2 +- .../test-cluster-worker-disconnect.js | 2 +- test/parallel/test-cluster-worker-events.js | 2 +- test/parallel/test-cluster-worker-exit.js | 2 +- test/parallel/test-cluster-worker-init.js | 2 +- .../test-cluster-worker-isconnected.js | 2 +- test/parallel/test-cluster-worker-isdead.js | 2 +- test/parallel/test-cluster-worker-kill.js | 2 +- test/parallel/test-cluster-worker-no-exit.js | 2 +- .../test-cluster-worker-wait-server-close.js | 2 +- .../parallel/test-dgram-cluster-bind-error.js | 2 +- .../test-dgram-cluster-close-during-bind.js | 2 +- .../test-dgram-exclusive-implicit-bind.js | 6 +- .../test-inspect-support-for-node_options.js | 2 +- .../test-inspector-port-zero-cluster.js | 4 +- test/parallel/test-listen-fd-cluster.js | 32 ++--- .../test-net-listen-exclusive-random-ports.js | 2 +- test/parallel/test-net-socket-constructor.js | 4 +- ...est-process-remove-all-signal-listeners.js | 2 +- test/parallel/test-tls-ticket-cluster.js | 8 +- test/sequential/test-cluster-inspect-brk.js | 4 +- .../test-cluster-net-listen-ipv6only-none.js | 2 +- .../test-cluster-net-listen-ipv6only-rr.js | 4 +- .../test-cluster-send-handle-large-payload.js | 2 +- .../test-dgram-bind-shared-ports.js | 4 +- .../sequential/test-inspector-port-cluster.js | 64 +++++----- .../test-net-listen-shared-ports.js | 2 +- 105 files changed, 318 insertions(+), 297 deletions(-) rename lib/internal/cluster/{master.js => parent.js} (96%) rename test/parallel/{test-cluster-master-error.js => test-cluster-parent-error.js} (93%) rename test/parallel/{test-cluster-master-kill.js => test-cluster-parent-kill.js} (89%) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 0b3586d10cd439..2fdab13a4c54ec 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -18,8 +18,8 @@ const cluster = require('cluster'); const http = require('http'); const numCPUs = require('os').cpus().length; -if (cluster.isMaster) { - console.log(`Master ${process.pid} is running`); +if (cluster.isParent) { + console.log(`Parent ${process.pid} is running`); // Fork workers. for (let i = 0; i < numCPUs; i++) { @@ -45,7 +45,7 @@ Running Node.js will now share port 8000 between the workers: ```console $ node server.js -Master 3596 is running +Parent 3596 is running Worker 4324 started Worker 4520 started Worker 6056 started @@ -66,12 +66,12 @@ The cluster module supports two methods of distributing incoming connections. The first one (and the default one on all platforms except Windows), -is the round-robin approach, where the master process listens on a +is the round-robin approach, where the parent process listens on a port, accepts new connections and distributes them across the workers in a round-robin fashion, with some built-in smarts to avoid overloading a worker process. -The second approach is where the master process creates the listen +The second approach is where the parent process creates the listen socket and sends it to interested workers. The workers then accept incoming connections directly. @@ -81,16 +81,16 @@ to operating system scheduler vagaries. Loads have been observed where over 70% of all connections ended up in just two processes, out of a total of eight. -Because `server.listen()` hands off most of the work to the master +Because `server.listen()` hands off most of the work to the parent process, there are three cases where the behavior between a normal Node.js process and a cluster worker differs: -1. `server.listen({fd: 7})` Because the message is passed to the master, +1. `server.listen({fd: 7})` Because the message is passed to the parent, file descriptor 7 **in the parent** will be listened on, and the handle passed to the worker, rather than listening to the worker's idea of what the number 7 file descriptor references. 2. `server.listen(handle)` Listening on handles explicitly will cause - the worker to use the supplied handle, rather than talk to the master + the worker to use the supplied handle, rather than talk to the parent process. 3. `server.listen(0)` Normally, this will cause servers to listen on a random port. However, in a cluster, each worker will receive the @@ -121,7 +121,7 @@ added: v0.7.0 * Extends: {EventEmitter} A `Worker` object contains all public information and method about a worker. -In the master it can be obtained using `cluster.workers`. In a worker +In the parent it can be obtained using `cluster.workers`. In a worker it can be obtained using `cluster.worker`. ### Event: `'disconnect'` @@ -201,14 +201,14 @@ Within a worker, `process.on('message')` may also be used. See [`process` event: `'message'`][]. -Here is an example using the message system. It keeps a count in the master +Here is an example using the message system. It keeps a count in the parent process of the number of HTTP requests received by the workers: ```js const cluster = require('cluster'); const http = require('http'); -if (cluster.isMaster) { +if (cluster.isParent) { // Keep track of http requests let numReqs = 0; @@ -240,7 +240,7 @@ if (cluster.isMaster) { res.writeHead(200); res.end('hello world\n'); - // Notify master about the request + // Notify parent about the request process.send({ cmd: 'notifyRequest' }); }).listen(8000); } @@ -275,7 +275,7 @@ changes: In a worker, this function will close all servers, wait for the `'close'` event on those servers, and then disconnect the IPC channel. -In the master, an internal message is sent to the worker causing it to call +In the parent, an internal message is sent to the worker causing it to call `.disconnect()` on itself. Causes `.exitedAfterDisconnect` to be set. @@ -299,7 +299,7 @@ close them. It also may be useful to implement a timeout, killing a worker if the `'disconnect'` event has not been emitted after some time. ```js -if (cluster.isMaster) { +if (cluster.isParent) { const worker = cluster.fork(); let timeout; @@ -343,7 +343,7 @@ This property is `true` if the worker exited due to `.kill()` or worker has not exited, it is `undefined`. The boolean [`worker.exitedAfterDisconnect`][] allows distinguishing between -voluntary and accidental exit, the master may choose not to respawn a worker +voluntary and accidental exit, the parent may choose not to respawn a worker based on this value. ```js @@ -375,8 +375,8 @@ While a worker is alive, this is the key that indexes it in added: v0.11.14 --> -This function returns `true` if the worker is connected to its master via its -IPC channel, `false` otherwise. A worker is connected to its master after it +This function returns `true` if the worker is connected to its parent via its +IPC channel, `false` otherwise. A worker is connected to its parent after it has been created. It is disconnected after the `'disconnect'` event is emitted. ### `worker.isDead()` @@ -392,8 +392,8 @@ const cluster = require('cluster'); const http = require('http'); const numCPUs = require('os').cpus().length; -if (cluster.isMaster) { - console.log(`Master ${process.pid} is running`); +if (cluster.isParent) { + console.log(`Parent ${process.pid} is running`); // Fork workers. for (let i = 0; i < numCPUs; i++) { @@ -425,7 +425,7 @@ added: v0.9.12 * `signal` {string} Name of the kill signal to send to the worker process. **Default**: `'SIGTERM'` -This function will kill the worker. In the master, it does this by disconnecting +This function will kill the worker. In the parent, it does this by disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by disconnecting the channel, and then exiting with code `0`. @@ -478,18 +478,18 @@ changes: * `callback` {Function} * Returns: {boolean} -Send a message to a worker or master, optionally with a handle. +Send a message to a worker or parent, optionally with a handle. -In the master this sends a message to a specific worker. It is identical to +In the parent this sends a message to a specific worker. It is identical to [`ChildProcess.send()`][]. -In a worker this sends a message to the master. It is identical to +In a worker this sends a message to the parent. It is identical to `process.send()`. -This example will echo back all messages from the master: +This example will echo back all messages from the parent: ```js -if (cluster.isMaster) { +if (cluster.isParent) { const worker = cluster.fork(); worker.send('hi there'); @@ -583,7 +583,7 @@ added: v0.7.0 After calling `listen()` from a worker, when the `'listening'` event is emitted on the server a `'listening'` event will also be emitted on `cluster` in the -master. +parent. The event handler is executed with two arguments, the `worker` contains the worker object and the `address` object contains the following connection @@ -617,7 +617,7 @@ changes: * `message` {Object} * `handle` {undefined|Object} -Emitted when the cluster master receives a message from any worker. +Emitted when the cluster parent receives a message from any worker. See [`child_process` event: `'message'`][]. @@ -629,9 +629,9 @@ added: v0.7.0 * `worker` {cluster.Worker} After forking a new worker, the worker should respond with an online message. -When the master receives an online message it will emit this event. +When the parent receives an online message it will emit this event. The difference between `'fork'` and `'online'` is that fork is emitted when the -master forks a worker, and `'online'` is emitted when the worker is running. +parent forks a worker, and `'online'` is emitted when the worker is running. ```js cluster.on('online', (worker) => { @@ -646,11 +646,11 @@ added: v0.7.1 * `settings` {Object} -Emitted every time [`.setupMaster()`][] is called. +Emitted every time [`.setupParent()`][] is called. The `settings` object is the `cluster.settings` object at the time -[`.setupMaster()`][] was called and is advisory only, since multiple calls to -[`.setupMaster()`][] can be made in a single tick. +[`.setupParent()`][] was called and is advisory only, since multiple calls to +[`.setupParent()`][] can be made in a single tick. If accuracy is important, use `cluster.settings`. @@ -665,12 +665,12 @@ added: v0.7.7 Calls `.disconnect()` on each worker in `cluster.workers`. When they are disconnected all internal handles will be closed, allowing the -master process to die gracefully if no other event is waiting. +parent process to die gracefully if no other event is waiting. The method takes an optional callback argument which will be called when finished. -This can only be called from the master process. +This can only be called from the parent process. ## `cluster.fork([env])` +Deprecated alias for isMaster, see isParent for more +details. + +## `cluster.isParent` + + * {boolean} -True if the process is a master. This is determined +True if the process is a parent. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` is -undefined, then `isMaster` is `true`. +undefined, then `isParent` is `true`. ## `cluster.isWorker` +Deprecated alias for setupParent, see setupParent +for more details. + +## `cluster.setupParent([settings])` + + * `settings` {Object} See [`cluster.settings`][]. -`setupMaster` is used to change the default 'fork' behavior. Once called, +`setupParent` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. Any settings changes only affect future calls to [`.fork()`][] and have no effect on workers that are already running. -The only attribute of a worker that cannot be set via `.setupMaster()` is +The only attribute of a worker that cannot be set via `.setupParent()` is the `env` passed to [`.fork()`][]. The defaults above apply to the first call only; the defaults for later -calls are the current values at the time of `cluster.setupMaster()` is called. +calls are the current values at the time of `cluster.setupParent()` is called. ```js const cluster = require('cluster'); -cluster.setupMaster({ +cluster.setupParent({ exec: 'worker.js', args: ['--use', 'https'], silent: true }); cluster.fork(); // https worker -cluster.setupMaster({ +cluster.setupParent({ exec: 'worker.js', args: ['--use', 'http'] }); cluster.fork(); // http worker ``` -This can only be called from the master process. +This can only be called from the parent process. ## `cluster.worker` -This function returns `true` if the worker is connected to its parent via its -IPC channel, `false` otherwise. A worker is connected to its parent after it +This function returns `true` if the worker is connected to its primary via its +IPC channel, `false` otherwise. A worker is connected to its primary after it has been created. It is disconnected after the `'disconnect'` event is emitted. ### `worker.isDead()` @@ -392,8 +392,8 @@ const cluster = require('cluster'); const http = require('http'); const numCPUs = require('os').cpus().length; -if (cluster.isParent) { - console.log(`Parent ${process.pid} is running`); +if (cluster.isPrimary) { + console.log(`Primary ${process.pid} is running`); // Fork workers. for (let i = 0; i < numCPUs; i++) { @@ -425,9 +425,10 @@ added: v0.9.12 * `signal` {string} Name of the kill signal to send to the worker process. **Default**: `'SIGTERM'` -This function will kill the worker. In the parent, it does this by disconnecting -the `worker.process`, and once disconnected, killing with `signal`. In the -worker, it does it by disconnecting the channel, and then exiting with code `0`. +This function will kill the worker. In the primary, it does this +by disconnecting the `worker.process`, and once disconnected, killing +with `signal`. In the worker, it does it by disconnecting the channel, +and then exiting with code `0`. Because `kill()` attempts to gracefully disconnect the worker process, it is susceptible to waiting indefinitely for the disconnect to complete. For example, @@ -478,18 +479,18 @@ changes: * `callback` {Function} * Returns: {boolean} -Send a message to a worker or parent, optionally with a handle. +Send a message to a worker or primary, optionally with a handle. -In the parent this sends a message to a specific worker. It is identical to +In the primary this sends a message to a specific worker. It is identical to [`ChildProcess.send()`][]. -In a worker this sends a message to the parent. It is identical to +In a worker this sends a message to the primary. It is identical to `process.send()`. -This example will echo back all messages from the parent: +This example will echo back all messages from the primary: ```js -if (cluster.isParent) { +if (cluster.isPrimary) { const worker = cluster.fork(); worker.send('hi there'); @@ -583,7 +584,7 @@ added: v0.7.0 After calling `listen()` from a worker, when the `'listening'` event is emitted on the server a `'listening'` event will also be emitted on `cluster` in the -parent. +primary. The event handler is executed with two arguments, the `worker` contains the worker object and the `address` object contains the following connection @@ -617,7 +618,7 @@ changes: * `message` {Object} * `handle` {undefined|Object} -Emitted when the cluster parent receives a message from any worker. +Emitted when the cluster primary receives a message from any worker. See [`child_process` event: `'message'`][]. @@ -629,9 +630,9 @@ added: v0.7.0 * `worker` {cluster.Worker} After forking a new worker, the worker should respond with an online message. -When the parent receives an online message it will emit this event. +When the primary receives an online message it will emit this event. The difference between `'fork'` and `'online'` is that fork is emitted when the -parent forks a worker, and `'online'` is emitted when the worker is running. +primary forks a worker, and `'online'` is emitted when the worker is running. ```js cluster.on('online', (worker) => { @@ -646,11 +647,11 @@ added: v0.7.1 * `settings` {Object} -Emitted every time [`.setupParent()`][] is called. +Emitted every time [`.setupPrimary()`][] is called. The `settings` object is the `cluster.settings` object at the time -[`.setupParent()`][] was called and is advisory only, since multiple calls to -[`.setupParent()`][] can be made in a single tick. +[`.setupPrimary()`][] was called and is advisory only, since multiple calls to +[`.setupPrimary()`][] can be made in a single tick. If accuracy is important, use `cluster.settings`. @@ -665,12 +666,12 @@ added: v0.7.7 Calls `.disconnect()` on each worker in `cluster.workers`. When they are disconnected all internal handles will be closed, allowing the -parent process to die gracefully if no other event is waiting. +primary process to die gracefully if no other event is waiting. The method takes an optional callback argument which will be called when finished. -This can only be called from the parent process. +This can only be called from the primary process. ## `cluster.fork([env])` -Deprecated alias for isMaster, see isParent for more +Deprecated alias for isMaster, see isPrimary for more details. -## `cluster.isParent` +## `cluster.isPrimary` * {boolean} -True if the process is a parent. This is determined +True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` is -undefined, then `isParent` is `true`. +undefined, then `isPrimary` is `true`. ## `cluster.isWorker` -Deprecated alias for setupParent, see setupParent +Deprecated alias for setupPrimary, see setupPrimary for more details. -## `cluster.setupParent([settings])` +## `cluster.setupPrimary([settings])` * `settings` {Object} See [`cluster.settings`][]. -`setupParent` is used to change the default 'fork' behavior. Once called, +`setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. Any settings changes only affect future calls to [`.fork()`][] and have no effect on workers that are already running. -The only attribute of a worker that cannot be set via `.setupParent()` is +The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to [`.fork()`][]. The defaults above apply to the first call only; the defaults for later -calls are the current values at the time of `cluster.setupParent()` is called. +calls are the current values at the time of `cluster.setupPrimary()` is called. ```js const cluster = require('cluster'); -cluster.setupParent({ +cluster.setupPrimary({ exec: 'worker.js', args: ['--use', 'https'], silent: true }); cluster.fork(); // https worker -cluster.setupParent({ +cluster.setupPrimary({ exec: 'worker.js', args: ['--use', 'http'] }); cluster.fork(); // http worker ``` -This can only be called from the parent process. +This can only be called from the primary process. ## `cluster.worker` -Deprecated alias for setupPrimary, see setupPrimary -for more details. +Deprecated alias for [`.setupPrimary()`][]. ## `cluster.setupPrimary([settings])` -Deprecated alias for isMaster, see isPrimary for more +Deprecated alias for [`cluster.isPrimary`][]. details. ## `cluster.isPrimary` From 119cb8515ca92d9050eb094bcdf8ae5fb4826cb9 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 21 Dec 2020 11:08:17 -0500 Subject: [PATCH 08/12] address comments --- doc/api/cluster.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 81c4e7144bc915..d98e22e0775e60 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -688,6 +688,7 @@ This can only be called from the primary process. ## `cluster.isMaster` Deprecated alias for [`cluster.isPrimary`][]. @@ -792,6 +793,7 @@ changes: - version: v6.4.0 pr-url: https://github.com/nodejs/node/pull/7838 description: The `stdio` option is supported now. +deprecated: REPLACEME --> Deprecated alias for [`.setupPrimary()`][]. @@ -899,6 +901,7 @@ socket.on('data', (id) => { [`child_process` event: `'message'`]: child_process.md#child_process_event_message [`cluster.settings`]: #cluster_cluster_settings [`disconnect()`]: child_process.md#child_process_subprocess_disconnect +[`.isPrimary()`]: #cluster_cluster_isprimary [`kill()`]: process.md#process_process_kill_pid_signal [`process` event: `'message'`]: process.md#process_event_message [`server.close()`]: net.md#net_event_close From 0210b8f946c35a823b5109c9a56b8f9c8f9330fc Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 21 Dec 2020 11:10:34 -0500 Subject: [PATCH 09/12] fixup --- doc/api/cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index d98e22e0775e60..c0aa906d367bc3 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -901,7 +901,7 @@ socket.on('data', (id) => { [`child_process` event: `'message'`]: child_process.md#child_process_event_message [`cluster.settings`]: #cluster_cluster_settings [`disconnect()`]: child_process.md#child_process_subprocess_disconnect -[`.isPrimary()`]: #cluster_cluster_isprimary +[`cluster.isPrimary()`]: #cluster_cluster_isprimary [`kill()`]: process.md#process_process_kill_pid_signal [`process` event: `'message'`]: process.md#process_event_message [`server.close()`]: net.md#net_event_close From 89bddae59f8866e808cde01f957f822382657cbd Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 21 Dec 2020 11:20:01 -0500 Subject: [PATCH 10/12] fixup --- doc/api/cluster.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index c0aa906d367bc3..f953cf6b25a2ce 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -691,7 +691,7 @@ added: v0.8.1 deprecated: REPLACEME --> -Deprecated alias for [`cluster.isPrimary`][]. +Deprecated alias for [`cluster.isPrimary()`][]. details. ## `cluster.isPrimary` @@ -789,11 +789,11 @@ This object is not intended to be changed or set manually. ## `cluster.setupMaster([settings])` Deprecated alias for [`.setupPrimary()`][]. From 434acc7954d5807dd82cc27bac72b73894802b53 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 4 Jan 2021 17:14:41 -0500 Subject: [PATCH 11/12] Update doc/api/cluster.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michaël Zasso --- doc/api/cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index f953cf6b25a2ce..d96a886902a127 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -901,7 +901,7 @@ socket.on('data', (id) => { [`child_process` event: `'message'`]: child_process.md#child_process_event_message [`cluster.settings`]: #cluster_cluster_settings [`disconnect()`]: child_process.md#child_process_subprocess_disconnect -[`cluster.isPrimary()`]: #cluster_cluster_isprimary +[`cluster.isPrimary`]: #cluster_cluster_isprimary [`kill()`]: process.md#process_process_kill_pid_signal [`process` event: `'message'`]: process.md#process_event_message [`server.close()`]: net.md#net_event_close From 7814c50e0ced5306f5d74eed3b1b51bf297a428b Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 4 Jan 2021 17:14:48 -0500 Subject: [PATCH 12/12] Update doc/api/cluster.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michaël Zasso --- doc/api/cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index d96a886902a127..a31077d8a779a2 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -691,7 +691,7 @@ added: v0.8.1 deprecated: REPLACEME --> -Deprecated alias for [`cluster.isPrimary()`][]. +Deprecated alias for [`cluster.isPrimary`][]. details. ## `cluster.isPrimary`