Fix some influxdb plugin bug (#6139)

This commit is contained in:
cuiweiwei 2021-01-08 14:49:44 +08:00 committed by GitHub
parent afc44d4a3d
commit e3fbb3f705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -53,6 +53,7 @@ Release Notes.
* Fix bug that `endpoint-name-grouping.yml` is not customizable in Dockerized case.
* Fix bug that istio version metric type on UI template mismatches the otel rule.
* Improve ReadWriteSafeCache concurrency read-write performance
* Fix bug that if use JSON as InfluxDB.ResponseFormat then NumberFormatException maybe occur.
#### UI
* Fix un-removed tags in trace query.

View File

@ -101,8 +101,8 @@ public class TopNRecordsQuery implements ITopNRecordsQueryDAO {
}
private static final Comparator<SelectedRecord> ASCENDING = Comparator.comparingLong(
a -> Long.parseLong(a.getValue()));
a -> ((Number) Double.parseDouble(a.getValue())).longValue());
private static final Comparator<SelectedRecord> DESCENDING = (a, b) -> Long.compare(
Long.parseLong(b.getValue()), Long.parseLong(a.getValue()));
((Number) Double.parseDouble(b.getValue())).longValue(), ((Number) Double.parseDouble(a.getValue())).longValue());
}