GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cluster: migrate from worker.suicide by evanlucas · Pull Request #3743 · nodejs/node

Conversation

@evanlucas

@evanlucas evanlucas commented Nov 10, 2015 •
edited by tniessen
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Replace it with worker.exitedAfterDisconnect. Print deprecation message when
getting or setting until it is removed.

Ref: #3721

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alex-kinokon and Haroenv reacted with thumbs up emoji Awk34 and enp2s0 reacted with thumbs down emoji
All reactions
  • 👍 2 reactions
  • 👎 2 reactions
@evanlucas evanlucas mentioned this pull request Nov 10, 2015
replace suicide as a verb #3721
Closed
@MylesBorins

MylesBorins commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MylesBorins MylesBorins added cluster Issues and PRs related to the cluster subsystem. semver-minor PRs that contain new features and should be released in the next minor version. labels Nov 10, 2015
@MylesBorins

MylesBorins commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

Test suite passes locally fwiw

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

JungMinu
JungMinu reviewed Nov 10, 2015
View reviewed changes
Comment thread doc/api/cluster.markdown Outdated

@JungMinu JungMinu Nov 10, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add exit, it was just voluntary -> it was just voluntary exit

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JungMinu

JungMinu commented Nov 10, 2015

Copy link
Copy Markdown
Member

LGTM with one comment

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mikeal

mikeal commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

"deprecate" is the wrong term here since you are ensuring exisiting compatibility. maybe "migrating" instead?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mikeal

mikeal commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

also, maybe not print the deprecation warning until the next major release.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MylesBorins
MylesBorins reviewed Nov 10, 2015
View reviewed changes
Comment thread lib/cluster.js

@MylesBorins MylesBorins Nov 10, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to watch for the 'suicide' action here to guarantee compatibility?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@evanlucas evanlucas Nov 10, 2015

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the message should only be internal, I don't think so. Unless you or someone else feel differently about it

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@MylesBorins MylesBorins Nov 10, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me 😄

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@evanlucas
evanlucas force-pushed the voluntary branch from 63a0c29 to 7975198 Compare November 10, 2015 19:36
@jasnell

jasnell commented Nov 10, 2015

Copy link
Copy Markdown
Member

LGTM but we need to be clear about the impact of this, however. It is quite likely a semver-major change (any time we talk about changing event names and deprecating existing terms we likely have to consider it a semver-major). That means getting a deprecation notice into v5 first, then not landing the actual change until v6.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mikeal

mikeal commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

@jasnell if it's backwards compatible why would it be a semver-major change?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Nov 10, 2015

Copy link
Copy Markdown
Member

I said "likely" ;-). The one part of this change that is potentially not backwards compatible is the event that's being triggered (https://github.com/nodejs/node/pull/3743/files#diff-0faa53fc02580d5de2ebb484c41d691cR696). Specifically, are we reasonably certain that this isn't breaking?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Qard

Qard commented Nov 10, 2015

Copy link
Copy Markdown
Member

A more boolean terminology like exitedVoluntarily might be a bit better. I could see someone thinking voluntaryExit is a function name.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas

evanlucas commented Nov 10, 2015

Copy link
Copy Markdown
Contributor Author

@jasnell I believe that those messages are only sent to/from a cluster by the cluster and workers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Nov 10, 2015

Copy link
Copy Markdown
Member

Ok. If we're reasonably sure that it's not breaking, I'm good with semver-minor.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas

evanlucas commented Nov 10, 2015

Copy link
Copy Markdown
Contributor Author

@Qard I'm fine with either. If you feel strongly about it, I will change it

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dandean
dandean reviewed Nov 10, 2015
View reviewed changes
Comment thread lib/cluster.js Outdated

@dandean dandean Nov 10, 2015

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this message include information about when (date or version) to expect deprecation to become removal?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mikeal mikeal Nov 10, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be slated for a major version. Honestly, we should just merge this and then open another PR right away with the deprecation warning since master is v6.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@evanlucas evanlucas Nov 10, 2015

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I just add a second commit? That way we can cherry-pick the first over to v5 and not the actual deprecation?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mikeal mikeal Nov 10, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Fishrock123

Fishrock123 commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

@ChALkeR I know you didn't feel for it, but could you run some npm analysis on the usage of this API if possible?

(Also cc @chrisdickinson)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123

Fishrock123 commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

As others have said I also think it may be worthwhile to think of a version of voluntaryExit that makes a little more sense as a boolean, if that's the kind of thing we want.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas

evanlucas commented Nov 10, 2015

Copy link
Copy Markdown
Contributor Author

Although long, if that is the way we want to go, I think exitedVoluntarily is the best

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123

Fishrock123 commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

So long as we can avoid naming like exitedVoluntarilyFromWorkerProcess ala what a certain other programming language is often blamed for I think we are mostly fine.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas
evanlucas force-pushed the voluntary branch from 7975198 to a45c4e2 Compare November 10, 2015 21:11
@evanlucas

evanlucas commented Nov 10, 2015

Copy link
Copy Markdown
Contributor Author

Updated to change to exitedVoluntarily. Also includes a commit that prints a deprecation warning.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mikeal

mikeal commented Nov 10, 2015

Copy link
Copy Markdown
Contributor

hrm... I may have misspoke. since we tag the PR to automatically do the version updates we may need two PRs for the two commits since one is semver-minor and one is semver-major.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas evanlucas changed the title cluster: deprecate worker.suicide cluster: migrate from worker.suicide Nov 10, 2015
@evanlucas
evanlucas force-pushed the voluntary branch from a45c4e2 to 00ff007 Compare November 10, 2015 21:20
@ChALkeR

ChALkeR commented Aug 5, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Btw, this wasn't backported to 4.x, was it? Perhaps it is too late now as 4.5 already got rcs (cc @thealphanerd), but if there would be 4.6 sometime, it could make sense to backport it the other way around and without the deprecation — i.e. make .exitedAfterDisconnect a getter/setter alias to .suicide in a semver-minor version of 4.x.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Aug 5, 2016

Copy link
Copy Markdown
Member

+1 SGTM

On Friday, August 5, 2016, Сковорода Никита Андреевич <
[email protected]> wrote:

Btw, this wasn't backported to 4.x, was it? Perhaps it is too late now as
4.5 already got rcs, but if there would be 4.6 sometime, it could make
sense to backport it the other way around and without the deprecation —
i.e. make .exitedAfterDisconnect a getter/setter alias to .suicide.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3743 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAa2eSlRqcZPIm26xbWiN2nT7qPSqJATks5qczxGgaJpZM4Gfr24
.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChALkeR

ChALkeR commented Aug 5, 2016

Copy link
Copy Markdown
Member

Because given our LTS timeline, if we don't make 4.x support .exitedAfterDisconnect, then hard-deprecating .suicide until at least 10.x won't be reasonable, because that would force libraries to resort to detection mechanisms.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas

evanlucas commented Aug 5, 2016

Copy link
Copy Markdown
Contributor Author

I'll submit a backport PR today

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@evanlucas evanlucas mentioned this pull request Aug 6, 2016
cluster: alias suicide to exitedAfterDisconnect #7998
Closed
4 tasks done
evanlucas added a commit to evanlucas/node that referenced this pull request Aug 7, 2016
@evanlucas
cluster: alias suicide to exitedAfterDisconnect
d101576
This is a backport of 4f619bd which
migrates from worker.suicide to worker.exitedAfterDisconnect.

Related: nodejs#3743
jasnell pushed a commit that referenced this pull request Aug 12, 2016
@evanlucas @jasnell
cluster: alias suicide to exitedAfterDisconnect
810f29f
This is a backport of 4f619bd which
migrates from worker.suicide to worker.exitedAfterDisconnect.

Refs: #3743
PR-URL: #7998
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
@sam-github sam-github mentioned this pull request Jun 14, 2017
cluster: remove deprecated problematic API #13684
Closed
4 tasks done
@nimit95 nimit95 mentioned this pull request Jul 24, 2019
worker.exitedAfterDisconnect is false, after the worker process has exited using process.exit() #28837
Closed
nimit95 added a commit to nimit95/node that referenced this pull request Jul 26, 2019
@nimit95
cluster: default value of exitedAfterDisconnect changed to false
e9a3db6
The defaul value of worker.exitedAfterDisconnect is undefined. If the
worker dies on its own the value is changed to false and doesn't
remains undefined. While the documentation just mentions 'Set by
calling .kill() or .disconnect(). Until then, it is undefined.'.
Making the default value as false in worker.js

Fixes: nodejs#28837
Refs: nodejs#3743
nimit95 added a commit to nimit95/node that referenced this pull request Jul 26, 2019
@nimit95
doc: changing the documentation to reflect the change
830e98a
Fixed the documentaion to reflect the changes in the default value
of worker.exitedAfterDisconnect

Fixes: nodejs#28837
Refs: nodejs#3743
nimit95 added a commit to nimit95/node that referenced this pull request Jul 26, 2019
@nimit95
test: test for the exitedAfterDisconnect default value
b2f60cb
The test checka for the exit code of the worker. cluster on exit
must be called. And the value for exitedAfterDisconnect should be false

Fixes: nodejs#28837
Refs: nodejs#3743
nimit95 added a commit to nimit95/node that referenced this pull request Jul 26, 2019
@nimit95
test: fixed test-cluster-worker-constructor.js for default value
7d11da2
fixed the test that checked for default value undefined to false and renamed the test that checks for the value exitedAfterDisconnect if the worker
exits on its own.

Fixes: nodejs#28837
Refs: nodejs#3743
nimit95 added a commit to nimit95/node that referenced this pull request Sep 2, 2019
@nimit95
doc: exitedAfterDisconnect value can be false
4ae3d75
Fixed the documentation to reflect the changes in the default value
of worker.exitedAfterDisconnect

Fixes: nodejs#28837
Refs: nodejs#3743
@nimit95 nimit95 mentioned this pull request Sep 2, 2019
doc: exitedAfterDisconnect value can be false #29404
Closed
4 tasks
danbev pushed a commit that referenced this pull request Sep 9, 2019
@nimit95 @danbev
doc: exitedAfterDisconnect value can be false
695e819
Fixed the documentation to reflect the changes in the default value
of worker.exitedAfterDisconnect

PR-URL: #29404
Fixes: #28837
Refs: #3743
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
targos pushed a commit that referenced this pull request Sep 20, 2019
@nimit95 @targos
doc: exitedAfterDisconnect value can be false
5d4655c
Fixed the documentation to reflect the changes in the default value
of worker.exitedAfterDisconnect

PR-URL: #29404
Fixes: #28837
Refs: #3743
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
BridgeAR pushed a commit that referenced this pull request Sep 25, 2019
@nimit95 @BridgeAR
doc: exitedAfterDisconnect value can be false
9e63f91
Fixed the documentation to reflect the changes in the default value
of worker.exitedAfterDisconnect

PR-URL: #29404
Fixes: #28837
Refs: #3743
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cluster Issues and PRs related to the cluster subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Milestone

6.0.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

20 participants

@evanlucas @MylesBorins @JungMinu @mikeal @jasnell @Qard @Fishrock123 @ChALkeR @OrangeDog @jwueller @orangemocha @cjihrig @mscdex @forivall @joepie91 @tejasmanohar @sam-github @julianlam @bnoordhuis @joshmanders
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.