Skip to content
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

Internal QueryPartitionProvider: Adds Singleton QueryPartitionProvider #1842

Merged
merged 10 commits into from
Sep 12, 2020

Conversation

DmitriMelnikov
Copy link
Contributor

Description

QueryPartitionProvider is an expensive object since it requires initialization that makes a call into native code. The change is making sure that a single instance of the QueryPartitionProvider created and shared between all the query requests. It is possible because provider does not hold container specific data. The change can improve light weight query requests by ~1.7%

Type of change

  • [] New feature (non-breaking change which adds functionality)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors) Description"

Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@bchong95 bchong95 changed the title Shared QueryPartitionProvider. Internal QueryPartitionProvider: Adds Singleton QueryPartitionProvider Sep 10, 2020
bchong95
bchong95 previously approved these changes Sep 10, 2020
@bchong95
Copy link
Contributor

Nice work! Thanks for making the change :)

ealsur
ealsur previously approved these changes Sep 10, 2020
Copy link
Member

@ealsur ealsur left a comment

Choose a reason for hiding this comment

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

LGTM, the .Result was removed

sboshra
sboshra previously approved these changes Sep 11, 2020
Copy link
Contributor

@sboshra sboshra left a comment

Choose a reason for hiding this comment

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

:shipit:

@DmitriMelnikov DmitriMelnikov dismissed stale reviews from sboshra and ealsur via 52d5c27 September 11, 2020 18:10
@j82w j82w merged commit c05f8c8 into master Sep 12, 2020
@j82w j82w deleted the users/dmmelnik/sharedQueryPartitionProvider branch September 12, 2020 00:18
@ghost
Copy link

ghost commented Dec 15, 2021

Closing due to in-activity, pease feel free to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants