mirror of https://github.com/status-im/consul.git
xds: ensure the active streams counters are 64 bit aligned on 32 bit systems (#11085)
This commit is contained in:
parent
2af8e16ef9
commit
5fe613dd05
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
xds: ensure the active streams counters are 64 bit aligned on 32 bit systems
|
||||||
|
```
|
|
@ -152,11 +152,12 @@ type Server struct {
|
||||||
|
|
||||||
DisableV2Protocol bool
|
DisableV2Protocol bool
|
||||||
|
|
||||||
activeStreams activeStreamCounters
|
activeStreams *activeStreamCounters
|
||||||
}
|
}
|
||||||
|
|
||||||
// activeStreamCounters simply encapsulates two counters accessed atomically to
|
// activeStreamCounters simply encapsulates two counters accessed atomically to
|
||||||
// ensure alignment is correct.
|
// ensure alignment is correct. This further requires that activeStreamCounters
|
||||||
|
// be a pointer field.
|
||||||
type activeStreamCounters struct {
|
type activeStreamCounters struct {
|
||||||
xDSv3 uint64
|
xDSv3 uint64
|
||||||
xDSv2 uint64
|
xDSv2 uint64
|
||||||
|
@ -197,6 +198,7 @@ func NewServer(
|
||||||
CheckFetcher: checkFetcher,
|
CheckFetcher: checkFetcher,
|
||||||
CfgFetcher: cfgFetcher,
|
CfgFetcher: cfgFetcher,
|
||||||
AuthCheckFrequency: DefaultAuthCheckFrequency,
|
AuthCheckFrequency: DefaultAuthCheckFrequency,
|
||||||
|
activeStreams: &activeStreamCounters{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue