From 6ff27c95e5e1e9e19b2b1575ce8217e9a02191b5 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Tue, 4 Apr 2017 11:29:21 -0600 Subject: [PATCH] Fix tsi assertions. --- tsdb/index/tsi1/series_block.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsdb/index/tsi1/series_block.go b/tsdb/index/tsi1/series_block.go index 30e901f35c..b0302a5f99 100644 --- a/tsdb/index/tsi1/series_block.go +++ b/tsdb/index/tsi1/series_block.go @@ -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) }