fix:fix cb rule no update bug.

Signed-off-by: Haotian Zhang <928016560@qq.com>
pull/1786/head
shedfreewu 1 month ago committed by Haotian Zhang
parent f7dc3aa9b9
commit 70e2b89fb4

@ -64,9 +64,9 @@ public class ConfigurationModifier implements PolarisConfigurationConfigModifier
@Override
public void modify(ConfigurationImpl configuration) {
configuration.getGlobal().getAPI().setReportEnable(false);
configuration.getGlobal().getStatReporter().setEnable(false);
configuration.getConsumer().getOutlierDetection().setWhen(OutlierDetectionConfig.When.never);
configuration.getConsumer().getCircuitBreaker().setEnable(false);
if (!polarisContextProperties.getEnabled() || !polarisConfigProperties.isEnabled()) {
return;

@ -275,9 +275,11 @@ public class PolarisConfigDataLocationResolver implements
if (!bootstrapContext.isRegistered(SDKContext.class)) {
SDKContext sdkContext = sdkContext(resolverContext,
polarisConfigProperties, polarisCryptoConfigProperties, polarisContextProperties);
// not init reporter when creating config data temp SDK context.
if (sdkContext.getConfig() instanceof ConfigurationImpl) {
// not init reporter when creating config data temp SDK context.
((ConfigurationImpl) sdkContext.getConfig()).getGlobal().getStatReporter().setEnable(false);
// not init circuit breaker when creating config data temp SDK context.
((ConfigurationImpl) sdkContext.getConfig()).getConsumer().getCircuitBreaker().setEnable(false);
}
sdkContext.init();
PolarisConfigSDKContextManager.setConfigSDKContext(sdkContext);

Loading…
Cancel
Save