-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Labels
Description
Issue
When ReadConsistencyStrategy is configured on requestOptions and the CosmosClient is using Gateway mode, the end-to-end behavior is not deterministic.
Ask
The ask is to "block" on CosmosClient, the ReadConsistencyStrategy option when such CosmosClient instance is configured with Gateway mode (either client-level or request-level setting).
References
See:
Lines 1871 to 1882 in 0bcde7e
| public void validateAndLogNonDefaultReadConsistencyStrategy(String readConsistencyStrategyName) { | |
| if (this.connectionPolicy.getConnectionMode() != ConnectionMode.DIRECT | |
| && readConsistencyStrategyName != null | |
| && ! readConsistencyStrategyName.equalsIgnoreCase(ReadConsistencyStrategy.DEFAULT.toString())) { | |
| logger.warn( | |
| "ReadConsistencyStrategy {} defined in Gateway mode. " | |
| + "This version of the SDK only supports ReadConsistencyStrategy in DIRECT mode. " | |
| + "This setting will be ignored.", | |
| readConsistencyStrategyName); | |
| } | |
| } |
Things to keep in mind
See: FaultInjectionServerErrorRuleOnGatewayV2Tests for running Gateway V2 tests. Ideally, we should stick to a single test class but using two different TestNG groups - one for thin-client-multi-region (use existing) and for multi-region. We also have various types of request options, so blocking ReadConsistencyStrategy should be all encompassing.
Reactions are currently unavailable