Skip to content

Commit

Permalink
Merge pull request #2012 from nats-io/arm32_panic
Browse files Browse the repository at this point in the history
Fix for #2011 and atomics on 32bit systems.
  • Loading branch information
derekcollison authored Mar 16, 2021
2 parents d7403ea + 2e9ae92 commit 9fa16e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
28 changes: 14 additions & 14 deletions server/filestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions server/jetstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9fa16e2

Please sign in to comment.