|
@@ -33,6 +33,7 @@ public class FlowPoolWithLevelSupplyRecallStrategy extends AbstractFlowPoolWithL
|
|
|
List<LevelWeight> availableLevels = new ArrayList<>();
|
|
|
for (Map.Entry<String, Double> entry : levelWeightMap.entrySet()) {
|
|
|
String levelKey = String.format(KEY_WITH_LEVEL_SUPPLY_FORMAT, param.getAppType(), entry.getKey());
|
|
|
+ log.info("supply flowpool levelKey = {}", levelKey);
|
|
|
if (redisTemplate.hasKey(levelKey)) {
|
|
|
LevelWeight lw = new LevelWeight();
|
|
|
lw.setLevel(entry.getKey());
|
|
@@ -41,6 +42,7 @@ public class FlowPoolWithLevelSupplyRecallStrategy extends AbstractFlowPoolWithL
|
|
|
availableLevels.add(lw);
|
|
|
}
|
|
|
}
|
|
|
+ log.info("supply flowpool availableLevels = {}", availableLevels);
|
|
|
if (CollectionUtils.isEmpty(availableLevels)) {
|
|
|
return Pair.of("", "");
|
|
|
}
|
|
@@ -72,6 +74,7 @@ public class FlowPoolWithLevelSupplyRecallStrategy extends AbstractFlowPoolWithL
|
|
|
for (Map.Entry<String, LevelP> entry : level_p_mapping.entrySet()) {
|
|
|
if (random_p >= entry.getValue().getMin()
|
|
|
&& random_p <= entry.getValue().getMax()) {
|
|
|
+ log.info("supply flowpool result {} {}", entry.getKey(), entry.getValue());
|
|
|
return Pair.of(entry.getValue().getLevelKey(), entry.getKey());
|
|
|
}
|
|
|
}
|