Skip to content

[FEATURE REQ] [Gateway V1/V2] Block ReadConsistencyStrategy in all Gateway modes — Direct-only until e2e support added #48110

@jeet1995

Description

@jeet1995

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:

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.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions