-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: clarify lifecycle of domain sockets #19471
Conversation
doc/api/net.md
Outdated
on file creation. If the UNIX domain socket (that is visible as a file system | ||
path) is created and used in conjunction with one of Node.js' API abstractions | ||
such as [`net.createServer()`][], it will be unlinked as part of | ||
[`server.close()`][]. On the other hand, if it is created and used otuside of |
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.
Nit: otuside -> outside
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.
thanks @vsemozhetbyt - fixed.
2dc3895
to
50477df
Compare
doc/api/net.md
Outdated
persist*, they are removed when the last reference to them is closed. Do not | ||
forget JavaScript string escaping requires paths to be specified with | ||
double-backslashes, such as: | ||
persist*, they are removed when the last reference to them is closed - managed |
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.
Hmm...So before you edited it, this sentence was already a run-on sentence due to the comma splice. I'm not sure I understand the material your adding in this paragraph. Does this seem right?:
Pipes will *not persist*. They are removed when the last reference to them is closed.
Unlike UNIX domain sockets, Windows will close and remove the pipe when the process
exits.
JavaScript string escaping requires paths to be specified with extra backslash escaping
such as:
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.
thanks @Trott - addressed, incorporated your text as it is with only a single word addition.
Nit: While we're editing these paragraphs, maybe fix |
@nodejs/documentation |
7d048d3
to
430db5c
Compare
doc/api/net.md
Outdated
persist*, they are removed when the last reference to them is closed. Do not | ||
forget JavaScript string escaping requires paths to be specified with | ||
double-backslashes, such as: | ||
sequences. Despite appearances, the pipe namespace is flat. Pipes will |
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.
Despite how it might look
or despite appearance
?
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.
"Despite appearances" is idiomatic US English. Don't know that I've ever heard "Despite appearance" and it would make me think the writer forgot the s
at the end of appearance
. "Despite how it might look" is a fine alternative.
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.
@benjamingr @Trott - addressed, thanks.
on file creation. It will be visible in the filesystem, and will *persist until | ||
unlinked*. | ||
on file creation. If the UNIX domain socket (that is visible as a file system | ||
path) is created and used in conjunction with one of Node.js' API abstractions |
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.
I'm not sure this is clear to be honest, I think an example would help more.
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.
@benjamingr - Can you please clarify what is not clear? and example for what?
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.
ping @benjamingr to see what can be done.
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.
@gireeshpunathil I'm not blocking - I'm just not sure the description here is less confusing than before. I don't have any ideas as to what I'd write differently - sorry!
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.
@benjamingr - thanks, sure. I have asked the OP ( @boneskull ) to have a look too to see if any improvements can be made. Else I will move towards landing, thanks!
In UNIX, the domain sockets once created persists until unlinked. Clarify which ones are persisted and which ones are cleared manually. In Windows, named pipes are cleared based on reference count, implemented by the underlying system. Disambiguate this from Garbage collection of the Node.js runtime. Refs: nodejs/help#1080
e4894e6
to
8ca426c
Compare
In UNIX, the domain sockets once created persists until unlinked. Clarify which ones are persisted and which ones are cleared manually. In Windows, named pipes are cleared based on reference count, implemented by the underlying system. Disambiguate this from Garbage collection of the Node.js runtime. Refs: nodejs/help#1080 PR-URL: #19471 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
the PR is landed, but I am wondering whether something went wrong or not - it had a merge conflict that I manually resolved by following the merge conflict resolve sequence through the command line. everything looks reasonable, except that it produced 2 more commits. Are we good here? @Trott / @joyeecheung |
I think it's too late for a force push. The allowed window is 10 min. |
@lpinca - but what went wrong? what needs to be reverted now? |
I honestly don't know.
Nothing, I guess. |
thanks, good to know! |
I think we should force push out those merge commits, but they've been there for two hours so I'd like another opinion. @nodejs/release @nodejs/tsc |
I'd say +1... but would want more TSC people to chime in |
+1 from me |
@gireeshpunathil this would need to be re-landed now... re-opening the PR doesn't work, unfortunately. (But if there are conflicts, maybe open another PR anyway?) |
I'm re-landing now. There don't appear to be any conflicts... |
|
Unrelated question: should we increase the allowed force push window to something bigger than 10 min? @gireeshpunathil noticed the issue ~18 min after landing and I suggested to not force push as 10 min had already passed. |
Ignore me: |
In UNIX, the domain sockets once created persists until unlinked. Clarify which ones are persisted and which ones are cleared manually. In Windows, named pipes are cleared based on reference count, implemented by the underlying system. Disambiguate this from Garbage collection of the Node.js runtime. Refs: nodejs/help#1080 PR-URL: nodejs#19471 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Landed in 53aaa55 |
@lpinca I still think 10 min is a good interval for the more common types of problems, that can be fixed by sending a quick fix-up PR or commenting metadata under the commits or something similar Maybe we could document the option of pinging the TSC explicitly? (Like, we can't 100 % outlaw force-pushes after more than 10 minutes anyway -- it's always going to be possible that we have to amend or remove commits for legal reasons.) |
Maybe something slightly bigger (15 min?) is more appropriate? GitHub notifications are fast but not instant and not all collaborators are on IRC. |
I'm not strictly opposed to increasing the time, but two things to consider:
|
In this particular case If it was a little bigger I would have suggested to @gireeshpunathil to force push but it was almost twice the allowed time. I agree with the other points though. |
Apologies for causing the mess. I take the blame for not fully understanding the process, and promise to be better next time. Thanks to the team those who stepped in and acted instantly to clean it! Looking back at what has happened:
No. As my perception about the problem and idea of solving it was not coherent, 5 or 10 extra minutes would not make any difference. However, IMO 10 minutes can be too less for someone (like me) to realize the issue, figure out what to do and apply the changes - of course it depends on the experience level of who lands PRs.
+1 - yes, that will really help! |
In UNIX, the domain sockets once created persists until unlinked. Clarify which ones are persisted and which ones are cleared manually. In Windows, named pipes are cleared based on reference count, implemented by the underlying system. Disambiguate this from Garbage collection of the Node.js runtime. Refs: nodejs/help#1080 PR-URL: #19471 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
In UNIX, the domain sockets once created persists until unlinked.
Clarify which ones are persisted and which ones are cleared manually.
In Windows, named pipes are cleared based on reference count,
implemented by the underlying system. Disambiguate this from
Garbage collection of the Node.js runtime.
Refs: nodejs/help#1080
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes