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

Query: Adds an environment config to suppress sending NonStreamingOrderBy in the list of query features sent to the gateway #4492

Conversation

neildsh
Copy link
Contributor

@neildsh neildsh commented May 14, 2024

Description

In order to retrieve a query plan for non streaming order by queries, the sdk must send NonStreamingOrderBy in the list of supported query features to the gateway. However, older gateways will not recognize this new value, causing the query plan request to fail with a 400. To mitigate this edge case, we add a check for an environment variable AZURE_COSMOS_NON_STREAMING_ORDER_BY_FLAG_DISABLED, which when set to True will suppress sending NonStreamingOrderBy in the list of supported query features.

A note about the naming
It is named as DISABLED by design for two reasons:

  • Since we decided to have this functionality enabled by default, if the environment variable is set, then the functionality would be disabled. This is reflected in the name of the environment variable.
  • The convention is always to have false be the default for boolean flags. (Since C# will auto initialize to false for members.) If we name the flag as ENABLED, the default value would have to be true

Type of change

  • Bug fix (non-breaking change which fixes an issue)

…By in the list of query features sent to the gateway
adityasa
adityasa previously approved these changes May 14, 2024
Copy link
Contributor

@adityasa adityasa left a comment

Choose a reason for hiding this comment

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

:shipit:

…suppression environment variable for the test pipeline since we run against an old emulator
@neildsh
Copy link
Contributor Author

neildsh commented May 14, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

sboshra
sboshra previously approved these changes May 14, 2024
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:

@neildsh neildsh added QUERY auto-merge Enables automation to merge PRs labels May 15, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot merged commit 3ae56db into master May 15, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enables automation to merge PRs QUERY
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants