From f20ba1001edfd90b2395cfcf16ade4bc7728c0c0 Mon Sep 17 00:00:00 2001 From: Edd Robinson Date: Tue, 13 Jun 2017 17:48:21 +0100 Subject: [PATCH] Add support for TSI shard streaming and shard size This commit firstly ensures that a shard's size on disk is accurately reported when using the tsi1 index, by including the on-disk size of the tsi1 index in the calculation. Secondly, this commit add support for shard streaming/copying when using the tsi1 index. Prior to this, a tsi1 index would not be correctly restored when streaming shards. --- CHANGELOG.md | 12 ++-- tsdb/engine/tsm1/MANIFEST | 5 -- tsdb/engine/tsm1/compact.go | 2 +- tsdb/engine/tsm1/engine.go | 43 ++++++++---- tsdb/engine/tsm1/file_store.go | 18 +++-- tsdb/engine/tsm1/file_store_test.go | 8 +-- tsdb/index.go | 3 + tsdb/index/inmem/inmem.go | 3 + tsdb/index/tsi1/file_set.go | 19 ++++- tsdb/index/tsi1/index.go | 103 +++++++++++++++++++++------- tsdb/index/tsi1/index_test.go | 83 ++++++++++++++++++++++ tsdb/index/tsi1/log_file.go | 3 +- 12 files changed, 240 insertions(+), 62 deletions(-) delete mode 100644 tsdb/engine/tsm1/MANIFEST diff --git a/CHANGELOG.md b/CHANGELOG.md index 3812196777f..a8c809f0b13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## v1.4.0 [unreleased] +### Features + +- [#8491](https://github.com/influxdata/influxdb/pull/8491): Add further tsi support for streaming/copying shards. + ### Bugfixes - [#8480](https://github.com/influxdata/influxdb/pull/8480): Change the default stats interval to 1 second instead of 10 seconds. @@ -33,15 +37,15 @@ The admin UI is removed and unusable in this release. The `[admin]` configuratio * The top-level config `bind-address` now defaults to `localhost:8088`. The previous default was just `:8088`, causing the backup and restore port to be bound on all available interfaces (i.e. including interfaces on the public internet). - + The following new configuration options are available. #### `[http]` Section -* `max-body-size` was added with a default of 25,000,000, but can be disabled by setting it to 0. +* `max-body-size` was added with a default of 25,000,000, but can be disabled by setting it to 0. Specifies the maximum size (in bytes) of a client request body. When a client sends data that exceeds - the configured maximum size, a `413 Request Entity Too Large` HTTP response is returned. - + the configured maximum size, a `413 Request Entity Too Large` HTTP response is returned. + #### `[continuous_queries]` Section * `query-stats-enabled` was added with a default of `false`. When set to `true`, continuous query execution statistics are written to the default monitor store. diff --git a/tsdb/engine/tsm1/MANIFEST b/tsdb/engine/tsm1/MANIFEST deleted file mode 100644 index 7f439bfbabf..00000000000 --- a/tsdb/engine/tsm1/MANIFEST +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files": [ - "00000001.tsl" - ] -} diff --git a/tsdb/engine/tsm1/compact.go b/tsdb/engine/tsm1/compact.go index 9ab37139ee6..e483635be24 100644 --- a/tsdb/engine/tsm1/compact.go +++ b/tsdb/engine/tsm1/compact.go @@ -793,7 +793,7 @@ func (c *Compactor) writeNewFiles(generation, sequence int, iter KeyIterator) ([ for { sequence++ // New TSM files are written to a temp file and renamed when fully completed. - fileName := filepath.Join(c.Dir, fmt.Sprintf("%09d-%09d.%s.tmp", generation, sequence, TSMFileExtension)) + fileName := filepath.Join(c.Dir, fmt.Sprintf("%09d-%09d.%s.%s", generation, sequence, TSMFileExtension, TmpTSMFileExtension)) // Write as much as possible to this file err := c.write(fileName, iter) diff --git a/tsdb/engine/tsm1/engine.go b/tsdb/engine/tsm1/engine.go index 457773c2297..848eda43bf1 100644 --- a/tsdb/engine/tsm1/engine.go +++ b/tsdb/engine/tsm1/engine.go @@ -17,8 +17,6 @@ import ( "sync/atomic" "time" - "github.com/influxdata/influxdb/tsdb/index/inmem" - "github.com/influxdata/influxdb/influxql" "github.com/influxdata/influxdb/models" "github.com/influxdata/influxdb/pkg/bytesutil" @@ -26,6 +24,8 @@ import ( "github.com/influxdata/influxdb/pkg/limiter" "github.com/influxdata/influxdb/tsdb" _ "github.com/influxdata/influxdb/tsdb/index" + "github.com/influxdata/influxdb/tsdb/index/inmem" + "github.com/influxdata/influxdb/tsdb/index/tsi1" "github.com/uber-go/zap" ) @@ -428,7 +428,7 @@ func (e *Engine) Statistics(tags map[string]string) []models.Statistic { // DiskSize returns the total size in bytes of all TSM and WAL segments on disk. func (e *Engine) DiskSize() int64 { - return e.FileStore.DiskSizeBytes() + e.WAL.DiskSizeBytes() + return e.FileStore.DiskSizeBytes() + e.WAL.DiskSizeBytes() + e.index.DiskSizeBytes() } // Open opens and initializes the engine. @@ -557,10 +557,6 @@ func (e *Engine) Backup(w io.Writer, basePath string, since time.Time) error { return err } - if err := e.index.SnapshotTo(path); err != nil { - return err - } - tw := tar.NewWriter(w) defer tw.Close() @@ -666,6 +662,8 @@ func (e *Engine) overlay(r io.Reader, basePath string, asNew bool) error { return nil, err } + // The filestore will only handle tsm files. Other file types will be + // ignored. if err := e.FileStore.Replace(nil, newFiles); err != nil { return nil, err } @@ -676,15 +674,27 @@ func (e *Engine) overlay(r io.Reader, basePath string, asNew bool) error { return err } + if idx, ok := e.index.(*tsi1.Index); ok { + // Initialise new index. + e.mu.Lock() + if e.index, err = idx.ReplaceIndex(newFiles); err != nil { + e.mu.Unlock() + return err + } + e.mu.Unlock() + return nil + } + // Load any new series keys to the index readers := make([]chan seriesKey, 0, len(newFiles)) + ext := fmt.Sprintf(".%s", TmpTSMFileExtension) for _, f := range newFiles { ch := make(chan seriesKey, 1) readers = append(readers, ch) // If asNew is true, the files created from readFileFromBackup will be new ones // having a temp extension. - f = strings.TrimSuffix(f, ".tmp") + f = strings.TrimSuffix(f, ext) fd, err := os.Open(f) if err != nil { @@ -749,9 +759,7 @@ func (e *Engine) readFileFromBackup(tr *tar.Reader, shardRelativePath string, as filename = fmt.Sprintf("%09d-%09d.%s", e.FileStore.NextGeneration(), 1, TSMFileExtension) } - destPath := filepath.Join(e.path, filename) - tmp := destPath + ".tmp" - + tmp := fmt.Sprintf("%s.%s", filepath.Join(e.path, filename), TmpTSMFileExtension) // Create new file on disk. f, err := os.OpenFile(tmp, os.O_CREATE|os.O_RDWR, 0666) if err != nil { @@ -1093,9 +1101,15 @@ func (e *Engine) CreateSnapshot() (string, error) { } e.mu.RLock() - defer e.mu.RUnlock() + path, err := e.FileStore.CreateSnapshot() + if err != nil { + e.mu.RUnlock() + return "", err + } + e.mu.RUnlock() - return e.FileStore.CreateSnapshot() + // Generate a snapshot of the index. + return path, e.index.SnapshotTo(path) } // writeSnapshotAndCommit will write the passed cache to a new TSM file and remove the closed WAL segments. @@ -1426,9 +1440,10 @@ func (e *Engine) cleanup() error { return err } + ext := fmt.Sprintf(".%s", TmpTSMFileExtension) for _, f := range allfiles { // Check to see if there are any `.tmp` directories that were left over from failed shard snapshots - if f.IsDir() && strings.HasSuffix(f.Name(), ".tmp") { + if f.IsDir() && strings.HasSuffix(f.Name(), ext) { if err := os.RemoveAll(filepath.Join(e.path, f.Name())); err != nil { return fmt.Errorf("error removing tmp snapshot directory %q: %s", f.Name(), err) } diff --git a/tsdb/engine/tsm1/file_store.go b/tsdb/engine/tsm1/file_store.go index e3905357702..95de788ae1f 100644 --- a/tsdb/engine/tsm1/file_store.go +++ b/tsdb/engine/tsm1/file_store.go @@ -18,6 +18,11 @@ import ( "github.com/uber-go/zap" ) +const ( + // The extension used to describe temporary snapshot files. + TmpTSMFileExtension = "tmp" +) + // TSMFile represents an on-disk TSM file. type TSMFile interface { // Path returns the underlying file path for the TSMFile. If the file @@ -345,8 +350,9 @@ func (f *FileStore) Open() error { if err != nil { return err } + ext := fmt.Sprintf(".%s", TmpTSMFileExtension) for _, fi := range tmpfiles { - if fi.IsDir() && strings.HasSuffix(fi.Name(), ".tmp") { + if fi.IsDir() && strings.HasSuffix(fi.Name(), ext) { ss := strings.Split(filepath.Base(fi.Name()), ".") if len(ss) == 2 { if i, err := strconv.Atoi(ss[0]); err != nil { @@ -515,16 +521,20 @@ func (f *FileStore) Replace(oldFiles, newFiles []string) error { f.mu.RUnlock() updated := make([]TSMFile, 0, len(newFiles)) + tsmTmpExt := fmt.Sprintf("%s.%s", TSMFileExtension, TmpTSMFileExtension) // Rename all the new files to make them live on restart for _, file := range newFiles { var newName = file - if strings.HasSuffix(file, ".tmp") { + if strings.HasSuffix(file, tsmTmpExt) { // The new TSM files have a tmp extension. First rename them. newName = file[:len(file)-4] if err := os.Rename(file, newName); err != nil { return err } + } else if !strings.HasSuffix(file, TSMFileExtension) { + // This isn't a .tsm or .tsm.tmp file. + continue } fd, err := os.Open(newName) @@ -577,7 +587,7 @@ func (f *FileStore) Replace(oldFiles, newFiles []string) error { deletes = append(deletes, file.Path()) // Rename the TSM file used by this reader - tempPath := file.Path() + ".tmp" + tempPath := fmt.Sprintf("%s.%s", file.Path(), TmpTSMFileExtension) if err := file.Rename(tempPath); err != nil { return err } @@ -801,7 +811,7 @@ func (f *FileStore) CreateSnapshot() (string, error) { defer f.mu.RUnlock() // get a tmp directory name - tmpPath := fmt.Sprintf("%s/%d.tmp", f.dir, f.currentTempDirID) + tmpPath := fmt.Sprintf("%s/%d.%s", f.dir, f.currentTempDirID, TmpTSMFileExtension) err := os.Mkdir(tmpPath, 0777) if err != nil { return "", err diff --git a/tsdb/engine/tsm1/file_store_test.go b/tsdb/engine/tsm1/file_store_test.go index be1b59238ab..740785797c6 100644 --- a/tsdb/engine/tsm1/file_store_test.go +++ b/tsdb/engine/tsm1/file_store_test.go @@ -2061,7 +2061,7 @@ func TestFileStore_Replace(t *testing.T) { } // Replace requires assumes new files have a .tmp extension - replacement := files[2] + ".tmp" + replacement := fmt.Sprintf("%s.%s", files[2], tsm1.TmpTSMFileExtension) os.Rename(files[2], replacement) fs := tsm1.NewFileStore(dir) @@ -2253,9 +2253,9 @@ func TestFileStore_Stats(t *testing.T) { "mem": []tsm1.Value{tsm1.NewValue(0, 1.0)}, }) - replacement := files[2] + "-foo" + ".tmp" // Assumes new files have a .tmp extension + replacement := fmt.Sprintf("%s.%s.%s", files[2], tsm1.TmpTSMFileExtension, tsm1.TSMFileExtension) // Assumes new files have a .tmp extension if err := os.Rename(newFile, replacement); err != nil { - + t.Fatalf("rename: %v", err) } // Replace 3 w/ 1 if err := fs.Replace(files, []string{replacement}); err != nil { @@ -2265,7 +2265,7 @@ func TestFileStore_Stats(t *testing.T) { var found bool stats = fs.Stats() for _, stat := range stats { - if strings.HasSuffix(stat.Path, "-foo") { + if strings.HasSuffix(stat.Path, fmt.Sprintf("%s.%s.%s", tsm1.TSMFileExtension, tsm1.TmpTSMFileExtension, tsm1.TSMFileExtension)) { found = true } } diff --git a/tsdb/index.go b/tsdb/index.go index ddfdbdbd4ff..700982a9235 100644 --- a/tsdb/index.go +++ b/tsdb/index.go @@ -49,6 +49,9 @@ type Index interface { // Creates hard links inside path for snapshotting. SnapshotTo(path string) error + // Size of the index on disk, if applicable. + DiskSizeBytes() int64 + // To be removed w/ tsi1. SetFieldName(measurement []byte, name string) AssignShard(k string, shardID uint64) diff --git a/tsdb/index/inmem/inmem.go b/tsdb/index/inmem/inmem.go index 73439e24856..bad06f1be37 100644 --- a/tsdb/index/inmem/inmem.go +++ b/tsdb/index/inmem/inmem.go @@ -673,6 +673,9 @@ func (i *Index) SeriesPointIterator(opt influxql.IteratorOptions) (influxql.Iter // SnapshotTo is a no-op since this is an in-memory index. func (i *Index) SnapshotTo(path string) error { return nil } +// DiskSizeBytes always returns zero bytes, since this is an in-memory index. +func (i *Index) DiskSizeBytes() int64 { return 0 } + // AssignShard update the index to indicate that series k exists in the given shardID. func (i *Index) AssignShard(k string, shardID uint64) { ss, _ := i.Series([]byte(k)) diff --git a/tsdb/index/tsi1/file_set.go b/tsdb/index/tsi1/file_set.go index 9b1f159a293..423e4fcb22e 100644 --- a/tsdb/index/tsi1/file_set.go +++ b/tsdb/index/tsi1/file_set.go @@ -17,9 +17,10 @@ import ( // FileSet represents a collection of files. type FileSet struct { - levels []CompactionLevel - files []File - filters []*bloom.Filter // per-level filters + levels []CompactionLevel + files []File + filters []*bloom.Filter // per-level filters + manifestSize int64 // Size of the manifest file in bytes. } // NewFileSet returns a new instance of FileSet. @@ -56,6 +57,15 @@ func (fs *FileSet) Release() { } } +// Size returns the on-disk size of the FileSet. +func (fs *FileSet) Size() int64 { + var total int64 + for _, f := range fs.files { + total += f.Size() + } + return total + int64(fs.manifestSize) +} + // Prepend returns a new file set with f added at the beginning. func (fs *FileSet) Prepend(f File) (*FileSet, error) { return NewFileSet(fs.levels, append([]File{f}, fs.files...)) @@ -942,6 +952,9 @@ type File interface { // Reference counting. Retain() Release() + + // Size of file on disk + Size() int64 } type Files []File diff --git a/tsdb/index/tsi1/index.go b/tsdb/index/tsi1/index.go index 111a3c991d2..53f76fd6614 100644 --- a/tsdb/index/tsi1/index.go +++ b/tsdb/index/tsi1/index.go @@ -7,6 +7,7 @@ import ( "fmt" "io/ioutil" "os" + "path" "path/filepath" "regexp" "sort" @@ -126,9 +127,9 @@ func (i *Index) Open() error { } // Read manifest file. - m, err := ReadManifestFile(filepath.Join(i.Path, ManifestFileName)) + m, err := ReadManifestFile(i.ManifestPath()) if os.IsNotExist(err) { - m = NewManifest() + m = NewManifest(i.ManifestPath()) } else if err != nil { return err } @@ -169,6 +170,7 @@ func (i *Index) Open() error { if err != nil { return err } + fs.manifestSize = m.size i.fileSet = fs // Set initial sequnce number. @@ -195,6 +197,28 @@ func (i *Index) Open() error { return nil } +// ReplaceIndex returns a new index built using the provided file paths. +func (i *Index) ReplaceIndex(newFiles []string) (*Index, error) { + var base string + for _, pth := range newFiles { + if !strings.Contains(pth, "/index") { + continue // Not a tsi1 file path. + } + + if base == "" { + base = path.Dir(pth) + } + if err := os.Rename(pth, strings.TrimSuffix(pth, ".tmp")); err != nil { + return nil, err + } + } + + // Create, open and return the new index. + idx := NewIndex() + idx.Path = base + return idx, idx.Open() +} + // openLogFile opens a log file and appends it to the index. func (i *Index) openLogFile(path string) (*LogFile, error) { f := NewLogFile(path) @@ -283,6 +307,7 @@ func (i *Index) Manifest() *Manifest { m := &Manifest{ Levels: i.levels, Files: make([]string, len(i.fileSet.files)), + path: i.ManifestPath(), } for j, f := range i.fileSet.files { @@ -293,8 +318,18 @@ func (i *Index) Manifest() *Manifest { } // writeManifestFile writes the manifest to the appropriate file path. -func (i *Index) writeManifestFile() error { - return WriteManifestFile(i.ManifestPath(), i.Manifest()) +func (i *Index) writeManifestFile(m *Manifest) error { + buf, err := json.MarshalIndent(m, "", " ") + if err != nil { + return err + } + buf = append(buf, '\n') + + if err := ioutil.WriteFile(i.ManifestPath(), buf, 0666); err != nil { + return err + } + + return nil } // WithLogger sets the logger for the index. @@ -340,13 +375,15 @@ func (i *Index) prependActiveLogFile() error { if err != nil { return err } - i.fileSet = fs // Write new manifest. - if err := i.writeManifestFile(); err != nil { + m := i.Manifest() + if err = m.Write(); err != nil { // TODO: Close index if write fails. return err } + fs.manifestSize = m.size + i.fileSet = fs return nil } @@ -730,6 +767,13 @@ func (i *Index) TagSets(name []byte, opt influxql.IteratorOptions) ([]*influxql. return sortedTagsSets, nil } +// DiskSizeBytes returns the size of the index on disk. +func (i *Index) DiskSizeBytes() int64 { + fs := i.RetainFileSet() + defer fs.Release() + return fs.Size() +} + // SnapshotTo creates hard links to the file set into path. func (i *Index) SnapshotTo(path string) error { i.mu.Lock() @@ -902,10 +946,13 @@ func (i *Index) compactToLevel(files []*IndexFile, level int) { i.fileSet = i.fileSet.MustReplace(IndexFiles(files).Files(), file) // Write new manifest. - if err := i.writeManifestFile(); err != nil { + var err error + m := i.Manifest() + if err = m.Write(); err != nil { // TODO: Close index if write fails. return err } + i.fileSet.manifestSize = m.size return nil }(); err != nil { logger.Error("cannot write manifest", zap.Error(err)) @@ -1033,10 +1080,13 @@ func (i *Index) compactLogFile(logFile *LogFile) { i.fileSet = i.fileSet.MustReplace([]File{logFile}, file) // Write new manifest. - if err := i.writeManifestFile(); err != nil { + var err error + m := i.Manifest() + if err = m.Write(); err != nil { // TODO: Close index if write fails. return err } + i.fileSet.manifestSize = m.size return nil }(); err != nil { logger.Error("cannot update manifest", zap.Error(err)) @@ -1184,12 +1234,15 @@ func ParseFilename(name string) (level, id int) { type Manifest struct { Levels []CompactionLevel `json:"levels,omitempty"` Files []string `json:"files,omitempty"` + size int64 // Holds the on-disk size of the manifest. + path string // location on disk of the manifest. } // NewManifest returns a new instance of Manifest with default compaction levels. -func NewManifest() *Manifest { +func NewManifest(path string) *Manifest { m := &Manifest{ Levels: make([]CompactionLevel, len(DefaultCompactionLevels)), + path: path, } copy(m.Levels, DefaultCompactionLevels[:]) return m @@ -1205,7 +1258,19 @@ func (m *Manifest) HasFile(name string) bool { return false } -// ReadManifestFile reads a manifest from a file path. +// Write writes the manifest file to the provided path. +func (m *Manifest) Write() error { + buf, err := json.MarshalIndent(m, "", " ") + if err != nil { + return err + } + buf = append(buf, '\n') + m.size = int64(len(buf)) + return ioutil.WriteFile(m.path, buf, 0666) +} + +// ReadManifestFile reads a manifest from a file path and returns the manifest +// along with its size and any error. func ReadManifestFile(path string) (*Manifest, error) { buf, err := ioutil.ReadFile(path) if err != nil { @@ -1217,25 +1282,13 @@ func ReadManifestFile(path string) (*Manifest, error) { if err := json.Unmarshal(buf, &m); err != nil { return nil, err } + // Set the size of the manifest. + m.size = int64(len(buf)) + m.path = path return &m, nil } -// WriteManifestFile writes a manifest to a file path. -func WriteManifestFile(path string, m *Manifest) error { - buf, err := json.MarshalIndent(m, "", " ") - if err != nil { - return err - } - buf = append(buf, '\n') - - if err := ioutil.WriteFile(path, buf, 0666); err != nil { - return err - } - - return nil -} - func joinIntSlice(a []int, sep string) string { other := make([]string, len(a)) for i := range a { diff --git a/tsdb/index/tsi1/index_test.go b/tsdb/index/tsi1/index_test.go index 158eca23965..dca638bf6c5 100644 --- a/tsdb/index/tsi1/index_test.go +++ b/tsdb/index/tsi1/index_test.go @@ -3,8 +3,10 @@ package tsi1_test import ( "fmt" "os" + "path/filepath" "reflect" "regexp" + "strings" "testing" "github.com/influxdata/influxdb/influxql" @@ -243,6 +245,87 @@ func TestIndex_DropMeasurement(t *testing.T) { }) } +func TestIndex_ReplaceIndex(t *testing.T) { + idx := MustOpenIndex() + defer idx.Close() + + tmpBase := os.TempDir() + if err := os.MkdirAll(filepath.Join(tmpBase, "index"), 0777); err != nil { + t.Fatal(err) + } + + names := []string{"a.tsi.tmp", "b.tsl.tmp", "c.tsi.tmp", "not_a_tsi_file.tsm.tmp"} + newFiles := make([]string, 0, len(names)) + for i, name := range names { + var inIndex string + if i < len(names)-1 { + // First three files are in the index directory. + inIndex = "index" + } + + fullPath := filepath.Join(tmpBase, inIndex, name) + fd, err := os.Create(fullPath) + if err != nil { + t.Fatal(err) + } + fd.Close() + newFiles = append(newFiles, fullPath) + } + + idx2, err := idx.ReplaceIndex(newFiles) + if err != nil { + t.Fatal(err) + } + defer func() { os.RemoveAll(idx2.Path); idx2.Close() }() + + if got, exp := idx2.Path, filepath.Join(tmpBase, "index"); got != exp { + t.Fatalf("got index path of %s, expected %s", got, exp) + } + + for _, nf := range newFiles { + // Remove tmp extension as would be done when creating the index. + nf = strings.TrimSuffix(nf, ".tmp") + + // Determine existence. + _, err := os.Stat(nf) + if strings.Contains(nf, "not_a_tsi_file.tsm") { + // This file should not exist in the index. + if !os.IsNotExist(err) { + t.Fatalf("got %v, expected %v", err, os.ErrNotExist) + } + } else { + // This file should exist in the index + if err != nil { + t.Fatalf("got %v, expected for file %s", err, nf) + } + } + + } +} + +// Ensure index can delete a measurement and all related keys, values, & series. +func TestIndex_DiskSizeBytes(t *testing.T) { + idx := MustOpenIndex() + defer idx.Close() + + // Add series to index. + if err := idx.CreateSeriesSliceIfNotExists([]Series{ + {Name: []byte("cpu"), Tags: models.NewTags(map[string]string{"region": "east"})}, + {Name: []byte("cpu"), Tags: models.NewTags(map[string]string{"region": "west"})}, + {Name: []byte("disk"), Tags: models.NewTags(map[string]string{"region": "north"})}, + {Name: []byte("mem"), Tags: models.NewTags(map[string]string{"region": "west", "country": "us"})}, + }); err != nil { + t.Fatal(err) + } + + // Verify on disk size is the same in each stage. + idx.Run(t, func(t *testing.T) { + if got, exp := idx.DiskSizeBytes(), int64(464); got != exp { + t.Fatalf("got %d bytes, expected %d", got, exp) + } + }) +} + // Index is a test wrapper for tsi1.Index. type Index struct { *tsi1.Index diff --git a/tsdb/index/tsi1/log_file.go b/tsdb/index/tsi1/log_file.go index c203a6a841c..75562dd6089 100644 --- a/tsdb/index/tsi1/log_file.go +++ b/tsdb/index/tsi1/log_file.go @@ -13,12 +13,11 @@ import ( "sync" "time" - "github.com/influxdata/influxdb/pkg/estimator/hll" - "github.com/influxdata/influxdb/influxql" "github.com/influxdata/influxdb/models" "github.com/influxdata/influxdb/pkg/bloom" "github.com/influxdata/influxdb/pkg/estimator" + "github.com/influxdata/influxdb/pkg/estimator/hll" "github.com/influxdata/influxdb/pkg/mmap" )