Azure / azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
MIT License
741 stars 494 forks source link

Migration path from sdk version < 3.38 to 3.38.1 #4431

Open ezgambac opened 6 months ago

ezgambac commented 6 months ago

From reading the docs and release logs, version 3.38.1 has the env variable AZURE_COSMOS_OPTIMISTIC_DIRECT_EXECUTION_ENABLED which can be set to false to migrate from sdk version < 3.38.

My question is if the following migration plan works:

My biggest concern is if a token generated in sdk version 3.38.1 with AZURE_COSMOS_OPTIMISTIC_DIRECT_EXECUTION_ENABLED=false, would it still work when AZURE_COSMOS_OPTIMISTIC_DIRECT_EXECUTION_ENABLED=true?

We want to prevent downtime for our customers, and want to see if this migration plan would allow us to prevent it.

ealsur commented 6 months ago

@adityasa Can you please help answer this question?

adityasa commented 6 months ago

@ezgambac thank you for reaching out and your question. Short answer - continuation tokens are honored while going from AZURE_COSMOS_OPTIMISTIC_DIRECT_EXECUTION_ENABLED=false to AZURE_COSMOS_OPTIMISTIC_DIRECT_EXECUTION_ENABLED=true

A separate, but relevant issue worth noting is:

4432

We are actively investigating and working on a fix for above issue. To double confirm, it only affects the queries that were initially executed using ODE codepath (queries that go against single partition or when collection had single physical parititon) and were resumed using continuation token after a partition split.