lib/workingsetcache: fix unaligned 64-bit atomic operation panic on 32-bit architectures

The panic has been introduced in 7275ebf91a
This commit is contained in:
Aliaksandr Valialkin 2021-12-03 01:20:04 +02:00
parent d40441947a
commit 51f2eb3c46
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1
2 changed files with 5 additions and 3 deletions

View File

@ -10,6 +10,8 @@ sort: 15
* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent.html): allow specifying `http` and `https` urls in the following command-line flags: `-promscrape.config`, `-remoteWrite.relabelConfig` and `-remoteWrite.urlRelabelConfig`.
* FEATURE: vminsert: allow specifying `http` and `https` urls in `-relabelConfig` command-line flag.
* BUGFIX: fix `unaligned 64-bit atomic operation` panic on 32-bit architectures, which has been introduced in v1.70.0.
## [v1.70.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.70.0)

View File

@ -25,6 +25,9 @@ type Cache struct {
curr atomic.Value
prev atomic.Value
// cs holds cache stats
cs fastcache.Stats
// mode indicates whether to use only curr and skip prev.
//
// This flag is set to switching if curr is filled for more than 50% space.
@ -39,9 +42,6 @@ type Cache struct {
wg sync.WaitGroup
stopCh chan struct{}
// cs holds cache stats
cs fastcache.Stats
}
// Load loads the cache from filePath and limits its size to maxBytes