Skip to content

Commit

Permalink
fix: fix monitorinstance in supercacheservice (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1001de authored Feb 20, 2024
1 parent 9b0857e commit 21e0552
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ public void load() throws Exception {
ProdLog.info("[SuperCache] load start");
SuperCache sc = new SuperCache();
sc.metaDataDictValueMap = metaDictValueService.getMetaDictValue();
ProdLog.info("[SuperCache][metaDataDictValueMap] size: " + sc.metaDataDictValueMap.size());
sc.expressionMetricList = metricInfoService.querySpmList();
ProdLog.info("[SuperCache][expressionMetricList] size: " + sc.expressionMetricList.size());
sc.workspaceTenantMap = new HashMap<>();
QueryWrapper<MonitorInstance> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("deleted", false);
queryWrapper.eq("deleted", 0);
List<MonitorInstance> instances = monitorInstanceService.list(queryWrapper);
instances.forEach(
instance -> sc.workspaceTenantMap.put(instance.getWorkspace(), instance.getTenant()));
ProdLog.info("[SuperCache][workspaceTenantMap] size: " + sc.workspaceTenantMap.size());
queryMetricInfoByPage(sc);
this.sc = sc;
ProdLog.info("[SuperCache] load end");
Expand Down Expand Up @@ -104,5 +107,7 @@ private void queryMetricInfoByPage(SuperCache sc) {
} while (current < 1000);
sc.metricInfoMap = map;
sc.workspaceMetricInfoMap = workspaceMap;
ProdLog.info("[SuperCache][metricInfoMap] size: " + sc.metricInfoMap.size());
ProdLog.info("[SuperCache][workspaceMetricInfoMap] size: " + sc.workspaceMetricInfoMap.size());
}
}

0 comments on commit 21e0552

Please sign in to comment.