Skip to content

[Internal]Thin Client Integration: Adds ThinProxy endpoint in account properties after retrieval from Gateway.#5088

Merged
kirankumarkolli merged 21 commits intomasterfrom
users/aavasthy/4999_retrieve_thinclientendpoint
Apr 5, 2025
Merged

[Internal]Thin Client Integration: Adds ThinProxy endpoint in account properties after retrieval from Gateway.#5088
kirankumarkolli merged 21 commits intomasterfrom
users/aavasthy/4999_retrieve_thinclientendpoint

Conversation

@aavasthy
Copy link
Copy Markdown
Contributor

@aavasthy aavasthy commented Mar 25, 2025

Pull Request Template

Description

The goal of this task is to fetch the thin proxy endpoint from gateway, so that from the .NET sdk side, we could remove the dependency on the hard coded thin proxy endpoint.

Updating the AccountProperties class to capture the thin proxy endpoint from thinClientWritableLocations property.
Have tested the change end to end against thinclient stag endpoint.

Currently the GW-SDK contract with thinclient enabled is like this but once thinclient is live the endpoint value will be retrieved via readableLocations and writableLocations.

{
	"_self": "",
	"id": "sumanttest4-westeurope",
	"_rid": "sumanttest4-westeurope.sql.cosmos.windows-int.net",
	"media": "//media/",
	"addresses": "//addresses/",
	"_dbs": "//dbs/",
	"writableLocations": [
		{
			"name": "West Europe",
			"databaseAccountEndpoint": "https://sumanttest4-westeurope.documents-test.windows-int.net:443/"
		}
	],
	"readableLocations": [
		{
			"name": "West Europe",
			"databaseAccountEndpoint": "https://sumanttest4-westeurope.documents-test.windows-int.net:443/"
		}
	],
	"enableMultipleWriteLocations": false,
	"continuousBackupEnabled": false,
	"enableNRegionSynchronousCommit": false,
	"userReplicationPolicy": {
		"asyncReplication": false,
		"minReplicaSetSize": 2,
		"maxReplicasetSize": 4
	},
	"userConsistencyPolicy": {
		"defaultConsistencyLevel": "Session"
	},
	"systemReplicationPolicy": {
		"minReplicaSetSize": 3,
		"maxReplicasetSize": 4
	},
	"readPolicy": {
		"primaryReadCoefficient": 1,
		"secondaryReadCoefficient": 1
	},
	"queryEngineConfiguration": "{\"allowNewKeywords\":true,\"maxJoinsPerSqlQuery\":10,\"maxQueryRequestTimeoutFraction\":0.9,\"maxSqlQueryInputLength\":524288,\"maxUdfRefPerSqlQuery\":10,\"queryMaxInMemorySortDocumentCount\":-1000,\"spatialMaxGeometryPointCount\":256,\"sqlAllowNonFiniteNumbers\":false,\"sqlDisableOptimizationFlags\":0,\"sqlQueryILDisableOptimizationFlags\":0,\"clientDisableOptimisticDirectExecution\":false,\"queryEnableFullText\":false,\"enableSpatialIndexing\":true,\"maxInExpressionItemsCount\":2147483647,\"maxLogicalAndPerSqlQuery\":2147483647,\"maxLogicalOrPerSqlQuery\":2147483647,\"maxSpatialQueryCells\":2147483647,\"sqlAllowAggregateFunctions\":true,\"sqlAllowGroupByClause\":true,\"sqlAllowLike\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"sqlAllowTop\":true}",
	"**thinClientWritableLocations**": [
		{
			"name": "West Europe",
			"databaseAccountEndpoint": "https://sumanttest4-westeurope.documents-test.windows-int.net:10650/"
		}
	],
	"**thinClientReadableLocations**": [
		{
			"name": "West Europe",
			"databaseAccountEndpoint": "https://sumanttest4-westeurope.documents-test.windows-int.net:10650/"
		}
	]
}

Type of change

Please delete options that are not relevant.

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

Closing issues

To automatically close an issue: closes #4999

Copy link
Copy Markdown

@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.

All good!

@aavasthy aavasthy changed the title [Internal]Thin Client Integration: Retrieve Thin Proxy Endpoint from Gateway [Internal]Thin Client Integration: Adds ThinProxy endpoint in account properties after retrieval from Gateway. Mar 25, 2025
@aavasthy aavasthy marked this pull request as ready for review March 25, 2025 20:41
Comment thread Microsoft.Azure.Cosmos/src/Resource/Settings/AccountProperties.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/DocumentClient.cs
Comment thread Microsoft.Azure.Cosmos/src/Resource/Settings/AccountProperties.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/DocumentClient.cs
Comment thread Microsoft.Azure.Cosmos/src/DocumentClient.cs
Comment thread Microsoft.Azure.Cosmos/src/Routing/GlobalEndpointManager.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/DocumentClient.cs
Comment thread Microsoft.Azure.Cosmos/src/Routing/LocationCache.cs
@kundadebdatta kundadebdatta added the auto-merge Enables automation to merge PRs label Apr 1, 2025
Comment thread Microsoft.Azure.Cosmos/src/Resource/Settings/AccountProperties.cs
Comment thread Microsoft.Azure.Cosmos/src/Routing/GlobalEndpointManager.cs
Copy link
Copy Markdown
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

LGTM - Thx

Copy link
Copy Markdown
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

LGTM - Thx

Copy link
Copy Markdown
Member

@kundadebdatta kundadebdatta left a comment

Choose a reason for hiding this comment

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

LGTM Now!

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.

[Thin Client Integration] Retrieve Thin Proxy Endpoint from Gateway

5 participants