diff --git a/store/watcher_hub.go b/store/watcher_hub.go index 45b98cfd2cc..d2a621d4efe 100644 --- a/store/watcher_hub.go +++ b/store/watcher_hub.go @@ -17,9 +17,9 @@ import ( // event happens between the end of the first watch command and the start // of the second command. type watcherHub struct { + count int64 // current number of watchers. Must be 64-bit aligned mutex sync.Mutex // protect the hash map watchers map[string]*list.List - count int64 // current number of watchers. EventHistory *EventHistory } diff --git a/third_party/github.com/coreos/go-log/log/logger.go b/third_party/github.com/coreos/go-log/log/logger.go index e8c200eacb2..f4cc23d4367 100644 --- a/third_party/github.com/coreos/go-log/log/logger.go +++ b/third_party/github.com/coreos/go-log/log/logger.go @@ -26,13 +26,14 @@ import ( // Logger is user-immutable immutable struct which can log to several outputs type Logger struct { - sinks []Sink // the sinks this logger will log to - verbose bool // gather expensive logging data? - prefix string // static field available to all log sinks under this logger + seq uint64 // sequential number of log message, starting at 1, must be 64-bit aligned - created time.Time // time when this logger was created - seq uint64 // sequential number of log message, starting at 1 - executable string // executable name + sinks []Sink // the sinks this logger will log to + verbose bool // gather expensive logging data? + prefix string // static field available to all log sinks under this logger + + created time.Time // time when this logger was created + executable string // executable name } // New creates a new Logger which logs to all the supplied sinks. The prefix @@ -42,13 +43,13 @@ type Logger struct { // filename. func New(prefix string, verbose bool, sinks ...Sink) *Logger { return &Logger{ - sinks: sinks, - verbose: verbose, - prefix: prefix, + sinks: sinks, + verbose: verbose, + prefix: prefix, - created: time.Now(), - seq: 0, - executable: getExecutableName(), + created: time.Now(), + seq: 0, + executable: getExecutableName(), } } diff --git a/third_party/github.com/rcrowley/go-metrics/ewma.go b/third_party/github.com/rcrowley/go-metrics/ewma.go index 8e22a7173de..405c43745ae 100644 --- a/third_party/github.com/rcrowley/go-metrics/ewma.go +++ b/third_party/github.com/rcrowley/go-metrics/ewma.go @@ -77,11 +77,11 @@ func (NilEWMA) Update(n int64) {} // of uncounted events and processes them on each tick. It uses the // sync/atomic package to manage uncounted events. type StandardEWMA struct { + uncounted int64 // must be 64-bit aligned alpha float64 init bool mutex sync.Mutex rate float64 - uncounted int64 } // Rate returns the moving average rate of events per second.