xds: ensure the active streams counters are 64 bit aligned on 32 bit systems (#11085)
This commit is contained in:
parent
a727ee6416
commit
55b36dd056
|
@ -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
|
||||
|
||||
activeStreams activeStreamCounters
|
||||
activeStreams *activeStreamCounters
|
||||
}
|
||||
|
||||
// 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 {
|
||||
xDSv3 uint64
|
||||
xDSv2 uint64
|
||||
|
@ -197,6 +198,7 @@ func NewServer(
|
|||
CheckFetcher: checkFetcher,
|
||||
CfgFetcher: cfgFetcher,
|
||||
AuthCheckFrequency: DefaultAuthCheckFrequency,
|
||||
activeStreams: &activeStreamCounters{},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue