Skip to content

Conversation

jkrems
Copy link
Contributor

@jkrems jkrems commented Sep 26, 2024

If multiple concurrent requests hit getEntryPointExports, all of
them would previously see the cache miss for entry point. With this
change, only the first request will and the others can leverage the
cache.

This can be important when instances are added to a pool under high
traffic.

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Contributor Author

@jkrems jkrems left a comment

Choose a reason for hiding this comment

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

Feel free to close as "not worth it". I'm just having flashbacks to issues with cache stampedes during bootup, so I'm a bit overly sensitive about it. :)

@jkrems jkrems requested a review from alan-agius4 September 26, 2024 15:25
@jkrems jkrems force-pushed the jk-entry-points-cache branch from e2b408e to 4562c95 Compare September 26, 2024 15:45
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM, one tiny nit.

@jkrems jkrems added the target: major This PR is targeted for the next major release label Sep 26, 2024
@jkrems jkrems force-pushed the jk-entry-points-cache branch from 4562c95 to 03e1d2c Compare September 26, 2024 15:49
If multiple concurrent requests hit `getEntryPointExports`, all of
them would previously see the cache miss for entry point. With this
change, only the first request will and the others can leverage the
cache.

This can be important when instances are added to a pool under high
traffic.
@jkrems jkrems force-pushed the jk-entry-points-cache branch from 03e1d2c to 436bcf6 Compare September 26, 2024 15:54
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Sep 26, 2024
@jkrems jkrems merged commit e52ae7f into angular:main Sep 26, 2024
31 checks passed
@jkrems jkrems deleted the jk-entry-points-cache branch September 26, 2024 16:14
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/ssr target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants