Fix Wrong Interval in BanyanDB Installation Process (#12264)
This commit is contained in:
parent
19a2395a9e
commit
b21e576a30
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
* Fix LAL test query api.
|
||||
* Add component libraries of `Derby`/`Sybase`/`SQLite`/`DB2`/`OceanBase` jdbc driver.
|
||||
* Fix setting the wrong interval to day level measure schema in BanyanDB installation process.
|
||||
|
||||
#### UI
|
||||
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ public enum MetadataRegistry {
|
|||
case Minute:
|
||||
return Duration.ofMinutes(1);
|
||||
case Day:
|
||||
return Duration.ofDays(1);
|
||||
return Duration.ofHours(24);
|
||||
default:
|
||||
throw new UnsupportedOperationException("unsupported downSampling interval");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,8 +227,9 @@ public class BanyanDBMetricsQueryDAO extends AbstractBanyanDBDAO implements IMet
|
|||
});
|
||||
for (final DataPoint dp : resp.getDataPoints()) {
|
||||
long timeBucket = TimeBucket.getTimeBucket(dp.getTimestamp(), schema.getMetadata().getDownSampling());
|
||||
if (map.putIfAbsent(timeBucket, dp) != null) {
|
||||
log.warn("duplicated data point at " + timeBucket);
|
||||
DataPoint preDp = map.putIfAbsent(timeBucket, dp);
|
||||
if (preDp != null) {
|
||||
log.warn("{}:{} returns duplicated data point at {}, pre:{}, current:{}", entityID, schema.getMetadata(), timeBucket, preDp.getFields(), dp.getFields());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue