Skip to content

Commit 11f2645

Browse files
committed
Fix 32bit alignment
1 parent 06a8fd6 commit 11f2645

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tsdb/engine/tsm1/cache.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ type Cache struct {
183183
// Due to a bug in atomic size needs to be the first word in the struct, as
184184
// that's the only place where you're guaranteed to be 64-bit aligned on a
185185
// 32 bit system. See: https://golang.org/pkg/sync/atomic/#pkg-note-BUG
186-
size uint64
186+
size uint64
187+
snapshotSize uint64
187188

188189
mu sync.RWMutex
189190
store storer
@@ -193,7 +194,6 @@ type Cache struct {
193194
// they're kept in memory while flushing so they can be queried along with the cache.
194195
// they are read only and should never be modified
195196
snapshot *Cache
196-
snapshotSize uint64
197197
snapshotting bool
198198

199199
// This number is the number of pending or failed WriteSnaphot attempts since the last successful one.

0 commit comments

Comments
 (0)