app/vmstorage/transport: fix panic during server stop on 32-bit arches

See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/212
This commit is contained in:
Aliaksandr Valialkin 2020-05-12 20:20:57 +03:00
parent c9ab6dc532
commit 3d3f41b961

View File

@ -30,6 +30,10 @@ var (
// Server processes connections from vminsert and vmselect.
type Server struct {
// Move stopFlag to the top of the struct in order to fix atomic access to it on 32-bit arches.
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/212
stopFlag uint64
storage *storage.Storage
vminsertLN net.Listener
@ -40,8 +44,6 @@ type Server struct {
vminsertConnsMap connsMap
vmselectConnsMap connsMap
stopFlag uint64
}
type connsMap struct {