Skip to content

[Internal] Thin Client Integration: Removes ThinClientStoreModel and uses GatewayStoreModel for better code modularity.#5323

Merged
kirankumarkolli merged 7 commits intomasterfrom
users/aavasthy/5311_Merge_StoreModels
Aug 5, 2025
Merged

[Internal] Thin Client Integration: Removes ThinClientStoreModel and uses GatewayStoreModel for better code modularity.#5323
kirankumarkolli merged 7 commits intomasterfrom
users/aavasthy/5311_Merge_StoreModels

Conversation

@aavasthy
Copy link
Copy Markdown
Contributor

Pull Request Template

Description

It is observed that most of the working principle on the ThinClientStoreModel can be achieved by the GatewayStoreModel. Therefore, removing ThinClientStoreModel and accommodating the logic to navigate between thinclient mode and gateway mode in GatewayStoreModel. Added tests to verify correct working of all three connection modes: thinclient, gateway and direct.

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 #5311

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 Merge ThinClientStoreModel and GatewayStoreModel. [Internal] Thin Client Integration: Removes ThinClientStoreModel and uses GatewayStoreModel for better code modularity. Jul 29, 2025
@aavasthy aavasthy self-assigned this Jul 29, 2025
Comment thread Microsoft.Azure.Cosmos/src/DocumentClient.cs Outdated
@kundadebdatta kundadebdatta requested a review from Copilot July 31, 2025 01:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR integrates thin client functionality directly into the GatewayStoreModel, removing the separate ThinClientStoreModel class for better code modularity. The change simplifies the architecture by consolidating connection mode logic within a single store model.

  • Removes ThinClientStoreModel and moves its functionality into GatewayStoreModel
  • Updates GatewayStoreModel to conditionally use thin client operations based on enableThinClientMode flag
  • Migrates all thin client tests from ThinClientStoreModelTests to GatewayStoreModelTest

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ThinClientStoreModelTests.cs Deleted - entire test file removed
GatewayStoreModelTest.cs Added thin client test methods migrated from deleted test file
CosmosItemThinClientTests.cs Updated assertions to check for "
ThinClientStoreModel.cs Deleted - entire class removed
GlobalPartitionEndpointManagerCore.cs Updated method calls to use GatewayStoreModel instead of ThinClientStoreModel
GatewayStoreModel.cs Enhanced to support thin client mode with conditional logic
DocumentClient.cs Simplified initialization to only use GatewayStoreModel for gateway mode
ClientRetryPolicy.cs Updated method call to use GatewayStoreModel instead of ThinClientStoreModel

Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs
@aavasthy
Copy link
Copy Markdown
Contributor Author

aavasthy commented Aug 4, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs
Comment thread Microsoft.Azure.Cosmos/src/ThinClientStoreClient.cs Outdated
kundadebdatta
kundadebdatta previously approved these changes Aug 4, 2025
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. Approved with suggestions.

Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs
Comment thread Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs Outdated
@kundadebdatta kundadebdatta added the auto-merge Enables automation to merge PRs label Aug 4, 2025
@kirankumarkolli kirankumarkolli merged commit 33b5c4e into master Aug 5, 2025
27 checks passed
@kirankumarkolli kirankumarkolli deleted the users/aavasthy/5311_Merge_StoreModels branch August 5, 2025 00:59
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 thin-client-integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Thin Client Integration] Redundant Store Model: Remove the ThinClientStoreModel and use GatewayStoreModel for Better Code Modularity

4 participants