diff --git a/index/writer.go b/index/writer.go index cd95c3d..85fc8ef 100644 --- a/index/writer.go +++ b/index/writer.go @@ -30,6 +30,11 @@ import ( ) type Writer struct { + stats Stats + + // state + nextSegmentID uint64 + config Config deletionPolicy DeletionPolicy directory Directory @@ -43,15 +48,10 @@ type Writer struct { rootPersisted []chan error // closed when root is persisted persistedCallbacks []func(error) - // state - nextSegmentID uint64 - // control/track goroutines closeCh chan struct{} asyncTasks sync.WaitGroup - stats Stats - closeOnce sync.Once }