From 9e960eaf5ce75f14544ed4e1f7ff163b537fe16f Mon Sep 17 00:00:00 2001 From: Aman Karmani Date: Sun, 25 Jul 2021 19:11:27 -0700 Subject: [PATCH 1/2] fix alignment for stats atomics --- index/writer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index/writer.go b/index/writer.go index cd95c3d..02cab42 100644 --- a/index/writer.go +++ b/index/writer.go @@ -30,6 +30,8 @@ import ( ) type Writer struct { + stats Stats + config Config deletionPolicy DeletionPolicy directory Directory @@ -50,8 +52,6 @@ type Writer struct { closeCh chan struct{} asyncTasks sync.WaitGroup - stats Stats - closeOnce sync.Once } From 7316f5810214561999ca516caf35fcfd7218323d Mon Sep 17 00:00:00 2001 From: Aman Karmani Date: Tue, 27 Jul 2021 18:59:38 -0700 Subject: [PATCH 2/2] fix another alignment issue --- index/writer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index/writer.go b/index/writer.go index 02cab42..85fc8ef 100644 --- a/index/writer.go +++ b/index/writer.go @@ -32,6 +32,9 @@ import ( type Writer struct { stats Stats + // state + nextSegmentID uint64 + config Config deletionPolicy DeletionPolicy directory Directory @@ -45,9 +48,6 @@ 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