diff --git a/server/filestore.go b/server/filestore.go index 61249455166..1de11b2f2c0 100644 --- a/server/filestore.go +++ b/server/filestore.go @@ -86,20 +86,20 @@ type fileStore struct { // Represents a message store block and its data. type msgBlock struct { - mu sync.RWMutex - fs *fileStore - mfn string - mfd *os.File - ifn string - ifd *os.File - liwsz int64 - index uint64 - bytes uint64 - msgs uint64 - first msgId - last msgId - lwits int64 - + // Here for 32bit systems and atomic. + first msgId + last msgId + mu sync.RWMutex + fs *fileStore + mfn string + mfd *os.File + ifn string + ifd *os.File + liwsz int64 + index uint64 + bytes uint64 + msgs uint64 + lwits int64 lwts int64 llts int64 lrts int64 diff --git a/server/jetstream.go b/server/jetstream.go index 422c1ad3ab8..31e9dafed6b 100644 --- a/server/jetstream.go +++ b/server/jetstream.go @@ -73,14 +73,15 @@ type JetStreamAPIStats struct { // This is for internal accounting for JetStream for this server. type jetStream struct { + // These are here first because of atomics on 32bit systems. + memReserved int64 + storeReserved int64 + apiCalls int64 mu sync.RWMutex srv *Server config JetStreamConfig cluster *jetStreamCluster accounts map[*Account]*jsAccount - memReserved int64 - storeReserved int64 - apiCalls int64 apiSubs *Sublist disabled bool oos bool