From f9ccfb5ea55cf169d1dd8a7c1e5d93b8f03cfeb4 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Wed, 9 Nov 2022 11:18:49 +0100 Subject: [PATCH] Fix alignment of atomic int64 (#11547) * Fix atomix int64 placement * Test main for 386 Signed-off-by: Julien Pivotto Signed-off-by: Ganesh Vernekar --- .github/workflows/ci.yml | 1 + tsdb/head.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea456adfa..465d98455 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: - uses: ./.github/actions/setup_environment - run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1 - run: go test ./tsdb/ -test.tsdb-isolation=false + - run: GOARCH=386 go test ./cmd/prometheus - run: make -C documentation/examples/remote_storage - run: make -C documentation/examples - uses: ./.github/actions/check_proto diff --git a/tsdb/head.go b/tsdb/head.go index 8dd151163..3afd745ff 100644 --- a/tsdb/head.go +++ b/tsdb/head.go @@ -130,14 +130,15 @@ type HeadOptions struct { // https://pkg.go.dev/sync/atomic#pkg-note-BUG MaxExemplars atomic.Int64 + OutOfOrderTimeWindow atomic.Int64 + OutOfOrderCapMax atomic.Int64 + ChunkRange int64 // ChunkDirRoot is the parent directory of the chunks directory. ChunkDirRoot string ChunkPool chunkenc.Pool ChunkWriteBufferSize int ChunkWriteQueueSize int - OutOfOrderTimeWindow atomic.Int64 - OutOfOrderCapMax atomic.Int64 // StripeSize sets the number of entries in the hash map, it must be a power of 2. // A larger StripeSize will allocate more memory up-front, but will increase performance when handling a large number of series.