userkdg commented on issue #7386:
URL: https://github.com/apache/skywalking/issues/7386#issuecomment-1895147884

   UP!
   
   可以尝试找出异常数据进行删除来解决。目前发现是历史数据问题导致的,暂未发现其他情况导致关系问题。
   
   - 查找,还没来得及看接口逻辑代码,对ES数据存储数据结构还不没了解。直接用UI接口进行查找
   ``` 
   curl --location --request POST 'http://localhost:12800/graphql' \
   --header 'Content-Type: application/json; charset=utf-8' \
   --data-raw '{
     "query": "query queryData($duration: Duration!, $serviceIds: [ID!]!) {\n  
topology: getServicesTopology(duration: $duration, serviceIds: $serviceIds) {\n 
   nodes {\n      id\n      name\n      type\n      isReal\n    }\n    calls 
{\n      id\n      source\n      detectPoints\n      target\n    }\n  }}",
     "variables": {
       "serviceIds": [
         "5pWw5o2u5byA5Y+R5pyN5Yqh.1",
         "5pWw5o2u6L+Q57u05pyN5Yqh.1",
         "5bmz5Y+w6YWN572u5pyN5Yqh.1",
         "572R5YWz5pyN5Yqh.1",
         "5pWw5o2u6ZuG5oiQ5pyN5Yqh.1",
         "5rOo5YaM5Lit5b+DKE5hY29zKQ==.1"
       ],
       "duration": {
       // 调整时间范围 筛选出异常关系数据,当然很熟悉ES数据结构和接口逻辑的可以直接查询es数据
         "start": "2024-01-13", 
         "end": "2024-01-17",
         "step": "DAY"
       }
     }
   }'
   ```
   
   - 删除区间内的ES数据
   ``` 
   -- delete
   POST  http://localhost:9200/sw_metrics-all-20240110/_delete_by_query
   {
     "query": {
       "match": {
         "metric_table": {
           "query": "service_relation_server_side"
         }
       // 增加其他更细化的查询条件,若生产数据。
       }
     }
   }
   ``` 


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to