mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4734 from luxas/32bit_alignments
etcdserver: align 64-bit atomics on 8-byte boundary
This commit is contained in:
commit
130567832f
@ -156,8 +156,12 @@ type Server interface {
|
||||
|
||||
// EtcdServer is the production implementation of the Server interface
|
||||
type EtcdServer struct {
|
||||
// r must be the first element to keep 64-bit alignment for atomic
|
||||
// r and inflightSnapshots must be the first elements to keep 64-bit alignment for atomic
|
||||
// access to fields
|
||||
|
||||
// count the number of inflight snapshots.
|
||||
// MUST use atomic operation to access this field.
|
||||
inflightSnapshots int64
|
||||
r raftNode
|
||||
|
||||
cfg *ServerConfig
|
||||
@ -202,10 +206,6 @@ type EtcdServer struct {
|
||||
forceVersionC chan struct{}
|
||||
|
||||
msgSnapC chan raftpb.Message
|
||||
|
||||
// count the number of inflight snapshots.
|
||||
// MUST use atomic operation to access this field.
|
||||
inflightSnapshots int64
|
||||
}
|
||||
|
||||
// NewServer creates a new EtcdServer from the supplied configuration. The
|
||||
|
Loading…
x
Reference in New Issue
Block a user