From 001750c2391373c5d50abe8313167d84909017c6 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 8 Oct 2021 19:34:38 +0300 Subject: [PATCH] lib/storage: fix unaligned access on 32-bit architectures. The bug has been introduced at a171916ef5664690c9b596fe73b095aa75fa5d5c --- docs/CHANGELOG.md | 2 ++ lib/storage/storage.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 5de5e5aae..73447c7cb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,6 +6,8 @@ sort: 15 ## tip +BUGFIX: vmstorage: fix `unaligned 64-bit atomic operation` panic on 32-bit architectures (arm and 386). The panic has been introduced in v1.67.0 + ## [v1.67.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.67.0) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 6b9f6d4d2..68f64558c 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -57,8 +57,6 @@ type Storage struct { hourlySeriesLimitRowsDropped uint64 dailySeriesLimitRowsDropped uint64 - isReadOnly uint32 - path string cachePath string retentionMsecs int64 @@ -137,6 +135,8 @@ type Storage struct { // metricIDs, since it usually requires 1 bit per deleted metricID. deletedMetricIDs atomic.Value deletedMetricIDsUpdateLock sync.Mutex + + isReadOnly uint32 } // OpenStorage opens storage on the given path with the given retentionMsecs.