mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2025-06-17 21:13:49 +02:00
Fix to avro reader
This commit is contained in:
parent
0fe634ec45
commit
d00bfc6b9c
@ -536,10 +536,11 @@ func (l *Level) loadAvroFile(m *MemoryStore, f *os.File, from int64) error {
|
||||
}
|
||||
|
||||
func (l *Level) createBuffer(m *MemoryStore, metricName string, floatArray util.FloatArray, from int64, resolution int64) error {
|
||||
n := len(floatArray)
|
||||
b := &buffer{
|
||||
frequency: resolution,
|
||||
start: from,
|
||||
data: floatArray,
|
||||
data: floatArray[0:n:n],
|
||||
prev: nil,
|
||||
next: nil,
|
||||
archived: true,
|
||||
@ -570,6 +571,8 @@ func (l *Level) createBuffer(m *MemoryStore, metricName string, floatArray util.
|
||||
for range missingCount {
|
||||
prev.data = append(prev.data, util.NaN)
|
||||
}
|
||||
|
||||
prev.data = prev.data[0:len(prev.data):len(prev.data)]
|
||||
}
|
||||
}
|
||||
l.metrics[minfo.Offset] = b
|
||||
|
Loading…
x
Reference in New Issue
Block a user