fix(tsdb): Fix tsm1 block merge. (#14254)

fix(tsdb): Fix tsm1 block merge.
pull/14262/head
Ben Johnson 2019-07-04 08:35:43 -06:00 committed by GitHub
commit 150165e92f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,9 @@ type BlockIterator struct {
// PeekNext returns the next key to be iterated or an empty string.
func (b *BlockIterator) PeekNext() []byte {
if len(b.entries) > 1 {
return b.iter.Key()
}
return b.iter.Peek()
}