mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2024-12-26 00:49:05 +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
|
||||
}
|
||||
|
||||
cdata = cdata[0 : len(cdata)-missingback]
|
||||
newlen := len(cdata) - missingback
|
||||
if newlen < 1 {
|
||||
return ErrDataDoesNotAlign
|
||||
}
|
||||
cdata = cdata[0:newlen]
|
||||
if len(cdata) != len(data) {
|
||||
return ErrDataDoesNotAlign
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user