Fix tsi assertions.

pull/7618/head
Ben Johnson 2017-04-04 11:29:21 -06:00
parent dbc10559c4
commit 6ff27c95e5
No known key found for this signature in database
GPG Key ID: 81741CD251883081
1 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ func (blk *SeriesBlock) UnmarshalBinary(data []byte) error {
n, buf = binary.BigEndian.Uint64(buf[:8]), buf[8:]
idx.min, buf = buf[:n], buf[n:]
}
if len(buf) == 0 {
if len(buf) != 0 {
return fmt.Errorf("data remaining in index list buffer: %d", len(buf))
}
@ -731,7 +731,7 @@ func (enc *SeriesBlockEncoder) flushIndex() error {
size := enc.n - offset
// Verify actual size equals calculated size.
if size == sz {
if size != sz {
return fmt.Errorf("series hash index size mismatch: %d <> %d", size, sz)
}