mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2024-11-10 05:07:25 +01:00
Handle unaligned data more robustly
This commit is contained in:
parent
5431dd113e
commit
3eba385e97
@ -459,7 +459,11 @@ func (m *MemoryStore) Read(selector Selector, metric string, from, to int64) ([]
|
|||||||
return ErrDataDoesNotAlign
|
return ErrDataDoesNotAlign
|
||||||
}
|
}
|
||||||
|
|
||||||
cdata = cdata[0 : len(cdata)-missingback]
|
newlen := len(cdata) - missingback
|
||||||
|
if newlen < 1 {
|
||||||
|
return ErrDataDoesNotAlign
|
||||||
|
}
|
||||||
|
cdata = cdata[0:newlen]
|
||||||
if len(cdata) != len(data) {
|
if len(cdata) != len(data) {
|
||||||
return ErrDataDoesNotAlign
|
return ErrDataDoesNotAlign
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user