Don't allocate when reading tombstone SeriesID set
parent
722ca22c79
commit
7d00a45ebf
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue