azure-sdk-for-java
azure-sdk-for-java copied to clipboard
FixFaultInjectionRuleFailedToApplyPerPartitionInGatewayMode
Issue: Fault injection rule can not be applied on partition level for gateway mode when using non session consistencies
Root cause: When customer define the fault injection rule with FaultInjectionEndpoint on gateway mode, since SDK does not route the request directly to the backend, so it will try to force the rule on partition level.
It depends on resolvedPartitionKey property in the request to properly apply the rule, however, currently, only session consistency would populate this info.
Fix: Also calculate resolvedPartitionKey for other consistencies