You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create this issue to link to this fix proposal: #451
The KafkaTargetScaler is using the obsolete ScaleMonitorDescriptor constructor without the functionId parameter.
[Obsolete("This constructor is obsolete. Use the version that takes function id instead.")]publicScaleMonitorDescriptor(stringid){Id=id;}publicScaleMonitorDescriptor(string id,string functionId):this(id){FunctionId=functionId;}
When target scaling is enabled (by default) the ScaleManager compares the FunctionId to evaluate if a ScaleMonitor is used in case a TargetScaler already exists. But for the same function, the FunctionId of the TargetScaler and ScaleMonitor are not equal.
// Check if TBS enabled on app levelif(scaleOptions.Value.IsTargetScalingEnabled){HashSet<string>targetScalerFunctions=newHashSet<string>();foreach(varscalerintargetScalers){stringscalerUniqueId=GetTargetScalerFunctionUniqueId(scaler);if(!_targetScalersInError.Contains(scalerUniqueId)){stringassemblyName=GetAssemblyName(scaler.GetType());boolfeatureDisabled=configuration.GetValue<string>(assemblyName)=="0";if(!featureDisabled){targetScalersToSample.Add(scaler);targetScalerFunctions.Add(scalerUniqueId);}}}foreach(varmonitorinscaleMonitors){stringmonitorUniqueId=GetScaleMonitorFunctionUniqueId(monitor);// Check if target based scaler exists for the functionif(!targetScalerFunctions.Contains(monitorUniqueId)){scaleMonitorsToSample.Add(monitor);}}}
Both ScaleMonitor and TargetScaler are retrieved for sampling. It leads to a bad behavior as the ScaleManager doesn't use the TargetScaler to override the vote result when there is any ScaleMonitor status.
// Set correct vote if all the triggers are targetif(!scaleStatuses.Any()&&aggregateScaleStatus.TargetWorkerCount.HasValue){aggregateScaleStatus.Vote=(ScaleVote)aggregateScaleStatus.TargetWorkerCount.Value.CompareTo(context.WorkerCount);}
Example of a bad result on /admin/host/scale/status function runtime endpoint:
Hello everyone,
I create this issue to link to this fix proposal: #451
The KafkaTargetScaler is using the obsolete ScaleMonitorDescriptor constructor without the functionId parameter.
When target scaling is enabled (by default) the ScaleManager compares the FunctionId to evaluate if a ScaleMonitor is used in case a TargetScaler already exists. But for the same function, the FunctionId of the TargetScaler and ScaleMonitor are not equal.
Both ScaleMonitor and TargetScaler are retrieved for sampling. It leads to a bad behavior as the ScaleManager doesn't use the TargetScaler to override the vote result when there is any ScaleMonitor status.
Example of a bad result on /admin/host/scale/status function runtime endpoint:
The text was updated successfully, but these errors were encountered: