Skip to content

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Feb 27, 2025

This PR makes single default project retrieving faster by using a single element map instead of a regular hash map.

This PR makes single default project retrieving faster by using a single
element map instead of a regular hash map.
@ywangd ywangd added >non-issue :Core/Infra/Core Core issues without another label v9.1.0 labels Feb 27, 2025
@ywangd ywangd requested review from a team and tvernum February 27, 2025 23:31
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Feb 27, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM

@ywangd ywangd added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Feb 28, 2025
@elasticsearchmachine elasticsearchmachine merged commit 7f501a5 into elastic:main Feb 28, 2025
17 checks passed
@ywangd ywangd deleted the get-project-optimization-for-single-default branch February 28, 2025 01:35
ywangd added a commit to ywangd/elasticsearch that referenced this pull request Feb 28, 2025
We can avoid using the volatile field when there is only a single
default project.

Relates: elastic#123662
ywangd added a commit to ywangd/elasticsearch that referenced this pull request Feb 28, 2025
No need to create new instances for the default project-id sent across
the wire. We can use the singleton field which should speeds up
key comparsion for Map.get operations.

Relates: elastic#123662
elasticsearchmachine pushed a commit that referenced this pull request Mar 5, 2025
No need to create new instances for the default project-id. We can use
the singleton field which should speeds up key comparsion for Map.get
operations.

Relates: #123662
georgewallace pushed a commit to georgewallace/elasticsearch that referenced this pull request Mar 11, 2025
No need to create new instances for the default project-id. We can use
the singleton field which should speeds up key comparsion for Map.get
operations.

Relates: elastic#123662
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants