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] Query: Adds environment variable for overriding EnableOptimisticDirectExecution default #4299

Conversation

adityasa
Copy link
Contributor

@adityasa adityasa commented Feb 1, 2024

Pull Request Template

Description

This change adds an ability to override the default value of EnableOptimisticDirectExecution setting using an environment variable named "AZURE_COSMOS_OPTIMISTIC_DIRECT_EXECUTION_ENABLED".
The environment variable should have a value that can be parsed as a boolean in order for the override to work.

As before the default value is true and also the backend setting using clientDisableOptimisticDirectExecution acts as a master switch and acts as global account-level override to disable/enable ODE behavior (in clients).

The environment variable can be used while upgrading the sdk package to 3.38 onwards, which turns on ODE by default. As mentioned in the release notes (of 3.38), due to the use of a new type of continuation token, applications that execute queries (and their continuations) in a stateless manner on machines that can be using different versions of sdk, failures can be observed.
This environment variable can be set to true before upgrading the sdk package to avoid such failures during the sdk deployment process in production environment. Once the upgrade is complete the environment variable can be removed or set to false.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #IssueNumber

@adityasa adityasa marked this pull request as ready for review February 1, 2024 20:10
@adityasa adityasa added the auto-merge Enables automation to merge PRs label Feb 1, 2024
@adityasa adityasa changed the title [Internal] Query: Adds environment variable configuration support for overriding default value for EnableOptimisticDirectExecution setting [Internal] Query: Adds environment variable for overriding default value for EnableOptimisticDirectExecution setting Feb 1, 2024
@adityasa adityasa changed the title [Internal] Query: Adds environment variable for overriding default value for EnableOptimisticDirectExecution setting [Internal] Query: Adds environment variable for overriding EnableOptimisticDirectExecution default Feb 1, 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:

@microsoft-github-policy-service microsoft-github-policy-service bot merged commit 9591253 into master Feb 2, 2024
25 checks passed
@microsoft-github-policy-service microsoft-github-policy-service bot deleted the users/adityasa/EnvironmentVariableForODE branch February 2, 2024 02:34
adityasa added a commit that referenced this pull request Feb 3, 2024
…misticDirectExecution default (#4299)

* Configured default value for EnableOptimisticDirectExecution setting to honor environment variable.

* Updated tests to include case insensitive checks no environment variable name.

* Addressed comments.

* Removed unused using.
kundadebdatta pushed a commit that referenced this pull request Feb 7, 2024
…misticDirectExecution default (#4299)

* Configured default value for EnableOptimisticDirectExecution setting to honor environment variable.

* Updated tests to include case insensitive checks no environment variable name.

* Addressed comments.

* Removed unused using.
kundadebdatta pushed a commit that referenced this pull request Feb 7, 2024
…misticDirectExecution default (#4299)

* Configured default value for EnableOptimisticDirectExecution setting to honor environment variable.

* Updated tests to include case insensitive checks no environment variable name.

* Addressed comments.

* Removed unused using.
kundadebdatta pushed a commit that referenced this pull request Feb 7, 2024
…misticDirectExecution default (#4299)

* Configured default value for EnableOptimisticDirectExecution setting to honor environment variable.

* Updated tests to include case insensitive checks no environment variable name.

* Addressed comments.

* Removed unused using.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants