mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
storage/backend: align fields used for atomic ops
Fixes crashes on 32-bit tests.
This commit is contained in:
parent
f72be5487c
commit
dd01ab6dc0
@ -62,16 +62,20 @@ type Snapshot interface {
|
||||
}
|
||||
|
||||
type backend struct {
|
||||
// size and commits are used with atomic operations so they must be
|
||||
// 64-bit aligned, otherwise 32-bit tests will crash
|
||||
|
||||
// size is the number of bytes in the backend
|
||||
size int64
|
||||
// commits counts number of commits since start
|
||||
commits int64
|
||||
|
||||
mu sync.RWMutex
|
||||
db *bolt.DB
|
||||
|
||||
batchInterval time.Duration
|
||||
batchLimit int
|
||||
batchTx *batchTx
|
||||
size int64
|
||||
|
||||
// number of commits since start
|
||||
commits int64
|
||||
|
||||
stopc chan struct{}
|
||||
donec chan struct{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user