-
Notifications
You must be signed in to change notification settings - Fork 525
Direct Package Upgrade: Fixes Cosmos.Direct Package to 3.39.1
#5241
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
Merged
microsoft-github-policy-service
merged 13 commits into
master
from
users/kundadebdatta/update_direct_version_3.39.1
Jun 13, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fc1a034
Code changes to update Direct version to 3.39.1
kundadebdatta 4b696ab
Code changes to fix address cache test.
kundadebdatta 0f25561
Code changes to introduce East US 3 Region in the .NET SDK.
kundadebdatta 9c5e92e
Code changes to update contract
kundadebdatta 35b425f
Code changes to fix baseline tests.
kundadebdatta 6da006f
Code changes to fix emulator test
kundadebdatta ba9a4d8
Revert "Code changes to fix emulator test"
kundadebdatta e3f7274
Code changes to fix order by.
kundadebdatta 1d7e710
Code changes to update vector distance function baseline.
kundadebdatta d5fcd3e
Suite0 fix
adityasa fe72e8f
Fix substatus mapping issue.
aavasthy f8210b2
Code changes to revert some of the query baselines.
kundadebdatta 240ee4d
Revert "Code changes to revert some of the query baselines."
kundadebdatta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
Microsoft.Azure.Cosmos/src/Util/SubStatusMappingUtil.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| //------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| //------------------------------------------------------------ | ||
| namespace Microsoft.Azure.Cosmos.Util | ||
| { | ||
| using Microsoft.Azure.Documents; | ||
|
|
||
| /// <summary> | ||
| /// Utility for correctly mapping duplicate SubStatus codes. | ||
| /// </summary> | ||
| internal class SubStatusMappingUtil | ||
| { | ||
| public static string GetSubStatusCodeString(StatusCodes statusCode, SubStatusCodes subStatusCode) | ||
| { | ||
| if ((int)subStatusCode == 1002) | ||
| { | ||
| return statusCode == StatusCodes.NotFound | ||
| ? nameof(SubStatusCodes.ReadSessionNotAvailable) | ||
| : nameof(SubStatusCodes.PartitionKeyRangeGone); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 2001) | ||
| { | ||
| return statusCode == StatusCodes.NoContent | ||
| ? nameof(SubStatusCodes.MissedTargetLsn) | ||
| : nameof(SubStatusCodes.SplitIsDisabled); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 2002) | ||
| { | ||
| return statusCode == StatusCodes.NoContent | ||
| ? nameof(SubStatusCodes.MissedTargetLsnOver100) | ||
| : nameof(SubStatusCodes.CollectionsInPartitionGotUpdated); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 2003) | ||
| { | ||
| return statusCode == StatusCodes.NoContent | ||
| ? nameof(SubStatusCodes.MissedTargetLsnOver1000) | ||
| : nameof(SubStatusCodes.CanNotAcquirePKRangesLock); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 2004) | ||
| { | ||
| return statusCode == StatusCodes.NoContent | ||
| ? nameof(SubStatusCodes.MissedTargetLsnOver10000) | ||
| : nameof(SubStatusCodes.ResourceNotFound); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 2011) | ||
| { | ||
| return statusCode == StatusCodes.NoContent | ||
| ? nameof(SubStatusCodes.MissedTargetGlobalCommittedLsn) | ||
| : nameof(SubStatusCodes.StorageSplitConflictingWithNWayThroughputSplit); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 2012) | ||
| { | ||
| return statusCode == StatusCodes.NoContent | ||
| ? nameof(SubStatusCodes.MissedTargetGlobalCommittedLsnOver100) | ||
| : nameof(SubStatusCodes.MergeIsDisabled); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 1004) | ||
| { | ||
| return statusCode == StatusCodes.BadRequest | ||
| ? nameof(SubStatusCodes.CrossPartitionQueryNotServable) | ||
| : nameof(SubStatusCodes.ConfigurationNameNotFound); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 1007) | ||
| { | ||
| return statusCode == StatusCodes.Gone | ||
| ? nameof(SubStatusCodes.CompletingSplit) | ||
| : nameof(SubStatusCodes.InsufficientBindablePartitions); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 1008) | ||
| { | ||
| return statusCode == StatusCodes.Gone | ||
| ? nameof(SubStatusCodes.CompletingPartitionMigration) | ||
| : nameof(SubStatusCodes.DatabaseAccountNotFound); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 1005) | ||
| { | ||
| return statusCode == StatusCodes.NotFound | ||
| ? nameof(SubStatusCodes.ConfigurationPropertyNotFound) | ||
| : nameof(SubStatusCodes.ProvisionLimitReached); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 3207) | ||
| { | ||
| return statusCode == StatusCodes.Conflict | ||
| ? nameof(SubStatusCodes.ConfigurationNameAlreadyExists) | ||
| : nameof(SubStatusCodes.PrepareTimeLimitExceeded); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 6001) | ||
| { | ||
| return statusCode == StatusCodes.ServiceUnavailable | ||
| ? nameof(SubStatusCodes.AggregatedHealthStateError) | ||
| : nameof(SubStatusCodes.PartitionMigrationWaitForFullSyncReceivedInternalServerErrorDuringCompleteMigrationFromBackend); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 6002) | ||
| { | ||
| return statusCode == StatusCodes.ServiceUnavailable | ||
| ? nameof(SubStatusCodes.ApplicationHealthStateError) | ||
| : nameof(SubStatusCodes.PartitionMigrationWaitForFullSyncReceivedInternalServerErrorDuringAbortMigrationFromBackend); | ||
| } | ||
|
|
||
| if ((int)subStatusCode == 6003) | ||
| { | ||
| return statusCode == StatusCodes.ServiceUnavailable | ||
| ? nameof(SubStatusCodes.HealthStateError) | ||
| : nameof(SubStatusCodes.PartitionMigrationFinalizeMigrationsDidNotCompleteInTenRetries); | ||
| } | ||
|
|
||
| return subStatusCode.ToString(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.