Skip to content

Commit

Permalink
fix: 64-bit alignment of 64-bit words accessed atomically #81
Browse files Browse the repository at this point in the history
  • Loading branch information
buraksezer committed Feb 20, 2021
1 parent 53a459c commit fcccd96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ func newListener() *listener {
type stream struct {
mu sync.RWMutex

pongReceivedAt int64
listeners map[uint64]*listener
read chan protocol.EncodeDecoder
write chan protocol.EncodeDecoder
pongReceivedAt int64
errCh chan error
ctx context.Context
cancel context.CancelFunc
Expand Down
9 changes: 5 additions & 4 deletions olric.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,19 @@ type Olric struct {
// name is BindAddr:BindPort. It defines servers unique name in the cluster.
name string

// Currently owned partition count. Approximate LRU implementation
// uses that.
ownedPartitionCount uint64

// These values is useful to control operation status.
bootstrapped int32

// numMembers is used to check cluster quorum.
numMembers int32

// Number of successfully passed checkpoints
passedCheckpoints int32

// Currently owned partition count. Approximate LRU implementation
// uses that.
ownedPartitionCount uint64

// this defines this Olric node in the cluster.
this discovery.Member
config *config.Config
Expand Down

0 comments on commit fcccd96

Please sign in to comment.