-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
lib: make ALS default to AsyncContextFrame #55552
lib: make ALS default to AsyncContextFrame #55552
Conversation
c7bd97e
to
15fd51a
Compare
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.
lgtm
15fd51a
to
a61b8d7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55552 +/- ##
==========================================
- Coverage 88.43% 88.40% -0.03%
==========================================
Files 654 654
Lines 187662 187662
Branches 36117 36101 -16
==========================================
- Hits 165962 165910 -52
- Misses 14938 14989 +51
- Partials 6762 6763 +1
|
This comment was marked as outdated.
This comment was marked as outdated.
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.
LGTM!
So we should decide: is this in fact a major change? Or can we consider this minor? I'm thinking maybe we can land as major in v24, watch for any issues, and if nothing comes up we can decide to call it minor and then backport to v22? |
If we talk about the CLI flags only, the Now, except for unforeseen bugs, will this change will break anything in the user code? |
The change should not break anything but it might result in a different graph returned by If we would be sure that it returns the same tree always the option |
I see. Personally I'd love to land this on 22 soon rather than in several months. But if you judge it too risky then I can definitely settle for semver-minor. |
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.
LGTM
I suggest we handle it as semver-minor and add the do-not-land-on-x
labels to prevent backports. If we later on decide to backport it, that's still a possibility.
The escape hatch exists specifically for Electron--it has a conflicting use of ContinuationPreservedEmbedderData so they will have to disable the new model until (and if) they can provide a way for both embedded data uses to coexist. Other than that, I don't expect anyone else to need the flag, but it's helpful at least during the transition for people to have an escape hatch if there does turn out to be some logical differences. I'm fairly sure it should be logically equivalent, but in a system that big it's easy to miss some edge cases. 😅 |
I assume electron needs/uses a different build not a command line flag. Therefore if I interpret above statement correct we could move to In general I agree that behavior should not change because of this and I'm fine with semver minor. And I'm also fine with the existing flag. Just throwing in some thoughts. Besides that we have anyway no tests nor guarantees what |
Landed in 51ae576 |
PR-URL: nodejs#55552 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
I've marked AsyncContextFrame as stable and made it the default. With this we should see the substantial performance improvements to AsyncLocalStorage as the default case for users on future versions of Node.js. Getting more users on this will also help to identify if there are any perf outliers to tweak further.
I hope to land this in v24. I assume we would generally consider this change as major, but I'm happy to downgrade it to minor if we think it's safe to do so.
(Pushing from the train somewhere between Valencia and Barcelona! 🚅💨)
cc @nodejs/diagnostics APMs have had some time to try this out and there have been no further issues after the initial iteration. I'm taking this to mean it seems to be stable. If you disagree, please speak up.
cc @nodejs/electron-installer Note that this makes use of the ContinuationPreservedEmbedderData API which Chromium also makes use of. This likely means Electron will need to change to default to disabled due to this conflict. I believe it's possible for Electron to do some work on their end to enable layering embedder data providers. If anyone is interested in picking this up to support both please reach out, I'm happy to help however I can! 🙂