ayumiono commented on issue #7369:
URL: https://github.com/apache/skywalking/issues/7369#issuecomment-886407344
> > What the bug exactlly is the ES return multiple docs when we search
instance_traffiic by id, and we chose a wrong indice to update
>
> Where does a duplicate record come from? We don't insert the entity into
the newer index at all.
thanks for you reply. the ES return duplicate record because of
we(skywalking es persistence plugin) search ES by indice alias
```
@Override
public List<Metrics> multiGet(Model model, List<String> ids) throws
IOException {
SearchResponse response = getClient().ids(model.getName(),
ids.toArray(new String[0]));
List<Metrics> result = new
ArrayList<>(response.getHits().getHits().length);
for (int i = 0; i < response.getHits().getHits().length; i++) {
Metrics source =
storageBuilder.map2Data(response.getHits().getAt(i).getSourceAsMap());
result.add(source);
}
return result;
}
```
--
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]