azure-sql-db-hyperscale-autoscaler icon indicating copy to clipboard operation
azure-sql-db-hyperscale-autoscaler copied to clipboard

Code was not updating the RequestedSLO as expected.

Open jcbendernh opened this issue 3 years ago • 2 comments

We had to change line 200 of the AutoScaler.cs file from ...

var index = availableSlos.IndexOf(currentSLO.ToString());

to...

var index = availableSlos.IndexOf(currentSLO.ToString().ToLower());

Once we did that, the RequestedSLO was showing correctly on the [dbo].[AutoscalerMonitor] table and also the ALTER DATABASE script was executing as expected to scale up/scale down the server.

Neither were happening with the old line 200.

I am also a Microsoft employee, you can reach me at [email protected].

jcbendernh avatar Mar 09 '22 23:03 jcbendernh

Yeah, that make sense, not sure why it has been working before :). Would be great if you can create a PR so that you can also get the proper credit for fixing this :)

yorek avatar Mar 10 '22 11:03 yorek

Hello @yorek, first of all, big thanks to you for this solution!!! I want to just propose that it will be good to get this code updated. I just spent some time to figure out why the function is not scaling as I didn't notice that there is opened issue with this. I basically changed line number 21: From: return $"{Name}gen{Generation}{Cores}".ToUpper(); To: return $"{Name}gen{Generation}{Cores}".ToLower();

Without that, case sensitivity blocked IF conditions in "public static HyperScaleTier GetServiceObjective(HyperScaleTier currentSLO, SearchDirection direction)" Screen from my testing output: image

Thank you! BR Stanislav

stanislavrupec avatar Mar 01 '23 13:03 stanislavrupec