I'm under an ugly impression that one can't actually change history and decay attributes of DynamicLoadBalanceFactorProvider.
I was trying to figure out why the new test suite of CustomLoadMetric tests does not pass. In order to get load figures without history and decay manipulation, I set the following:
The aforementioned history=0 effectively means that there is just 1 "slot" for a one historical value on which decay function should work.
If you take a look at the code in DynamicLoadBalanceFactorProvider constructor, it is apparent
that the size of the List that later serves for storing the historical values is set sooner than the actual setHistory(int history) method is called.
The actual size of that List collection wouldn't do any harm by itself but it is being used in the aforementioned class with .size() to control cycles.
The same IMHO holds for the decay attribute.
Anyhow, I put some additional logging to the DynamicLoadBalanceFactorProvider.java:
with the following being the output: redacted_log.
So, despite having history=0, which should force the system to keep just 1, the current value, metricLoadHistory grew from