dmsolr commented on a change in pull request #6066:
URL: https://github.com/apache/skywalking/pull/6066#discussion_r550090968
##########
File path:
oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/TableMetaInfo.java
##########
@@ -54,15 +54,25 @@ public static void addModel(Model model) {
storageAndColumnMap.put(columnName.getStorageName(),
columnName.getName());
});
+ storageAndTagMap.put(InstanceTraffic.NAME,
InfluxConstants.TagName.NAME);
if (model.getName().endsWith("_traffic")) {
- // instance_traffic service_id, endpoint_traffic service_id
- if (InstanceTraffic.INDEX_NAME.equals(model.getName())
- || EndpointTraffic.INDEX_NAME.equals(model.getName())) {
- storageAndTagMap.put(EndpointTraffic.SERVICE_ID,
InfluxConstants.TagName.SERVICE_ID);
- } else {
+ switch (model.getName()) {
+ // instance_traffic name, service_id
+ case InstanceTraffic.INDEX_NAME: {
+ storageAndTagMap.put(InstanceTraffic.NAME,
InfluxConstants.TagName.NAME);
Review comment:
`MetadataQuery#getServiceInstances` dependent on `NAME` to avoid
duplication records.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]