Don't allocate when reading tombstone SeriesID set

pull/10234/head
Edd Robinson 2018-08-01 15:36:38 +01:00
parent 722ca22c79
commit 7d00a45ebf
2 changed files with 3 additions and 3 deletions

View File

@ -416,7 +416,7 @@ func (itr *seriesIDExprIterator) Next() (SeriesIDElem, error) {
}
// MergeSeriesIDIterators returns an iterator that merges a set of iterators.
// Iterators that are first in the list take precendence and a deletion by those
// Iterators that are first in the list take precedence and a deletion by those
// early iterators will invalidate elements by later iterators.
func MergeSeriesIDIterators(itrs ...SeriesIDIterator) SeriesIDIterator {
if n := len(itrs); n == 0 {

View File

@ -64,8 +64,8 @@ type IndexFile struct {
level int
id int
mu sync.RWMutex
// Compaction tracking.
mu sync.RWMutex
compacting bool
// Path to data file.
@ -229,7 +229,7 @@ func (f *IndexFile) SeriesIDSet() (*tsdb.SeriesIDSet, error) {
func (f *IndexFile) TombstoneSeriesIDSet() (*tsdb.SeriesIDSet, error) {
ss := tsdb.NewSeriesIDSet()
if err := ss.UnmarshalBinary(f.tombstoneSeriesIDSetData); err != nil {
if err := ss.UnmarshalBinaryUnsafe(f.tombstoneSeriesIDSetData); err != nil {
return nil, err
}
return ss, nil