Merge pull request #2012 from nats-io/arm32_panic

Fix for #2011 and atomics on 32bit systems.
This commit is contained in:
Derek Collison
2021-03-16 14:38:46 -07:00
committed by GitHub
2 changed files with 18 additions and 17 deletions

View File

@@ -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

View File

@@ -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