Fix build and upgrade CI Go to 1.18.7

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
This commit is contained in:
Ganesh Vernekar 2022-10-06 20:09:19 +05:30
parent 83d9ee3ab7
commit 8a4a659d73
No known key found for this signature in database
GPG key ID: F056451B52F1DC34
10 changed files with 9 additions and 35 deletions

View file

@ -11,8 +11,8 @@ jobs:
- name: Upgrade golang
run: |
cd /tmp
wget https://dl.google.com/go/go1.17.7.linux-amd64.tar.gz
tar -zxvf go1.17.7.linux-amd64.tar.gz
wget https://dl.google.com/go/go1.18.7.linux-amd64.tar.gz
tar -zxvf go1.18.7.linux-amd64.tar.gz
sudo rm -fr /usr/local/go
sudo mv /tmp/go /usr/local/go
cd -

View file

@ -11,8 +11,8 @@ jobs:
- name: Upgrade golang
run: |
cd /tmp
wget https://dl.google.com/go/go1.17.7.linux-amd64.tar.gz
tar -zxvf go1.17.7.linux-amd64.tar.gz
wget https://dl.google.com/go/go1.18.7.linux-amd64.tar.gz
tar -zxvf go1.18.7.linux-amd64.tar.gz
sudo rm -fr /usr/local/go
sudo mv /tmp/go /usr/local/go
cd -

View file

@ -470,7 +470,7 @@ instance: {{ $v.Labels.instance }}, value: {{ printf "%.0f" $v.Value }};
close(getDoneCh)
}()
_, err = ruleWithQueryInTemplate.Eval(
suite.Context(), evalTime, slowQueryFunc, nil, 0,
suite.Context(), 0, evalTime, slowQueryFunc, nil, 0,
)
require.NoError(t, err)
}

View file

@ -1400,10 +1400,6 @@ func (db *DB) reloadBlocks() (err error) {
return nil
}
func (db *DB) AllowOverlappingQueries() bool {
return db.opts.AllowOverlappingQueries || db.oooWasEnabled.Load()
}
func openBlocks(l log.Logger, dir string, loaded []*Block, chunkPool chunkenc.Pool, cache *hashcache.SeriesHashCache) (blocks []*Block, corrupted map[ulid.ULID]error, err error) {
bDirs, err := blockDirs(dir)
if err != nil {

View file

@ -3970,7 +3970,6 @@ func TestMetadataAssertInMemoryData(t *testing.T) {
// TODO(codesome): test more samples incoming once compaction has started. To verify new samples after the start
//
// are not included in this compaction.
>>>>>>> upstream/main
func TestOOOCompaction(t *testing.T) {
dir := t.TempDir()

View file

@ -960,27 +960,6 @@ func (h *Head) updateMinOOOMaxOOOTime(mint, maxt int64) {
}
}
func (h *Head) updateMinOOOMaxOOOTime(mint, maxt int64) {
for {
lt := h.MinOOOTime()
if mint >= lt {
break
}
if h.minOOOTime.CAS(lt, mint) {
break
}
}
for {
ht := h.MaxOOOTime()
if maxt <= ht {
break
}
if h.maxOOOTime.CAS(ht, maxt) {
break
}
}
}
// SetMinValidTime sets the minimum timestamp the head can ingest.
func (h *Head) SetMinValidTime(minValidTime int64) {
h.minValidTime.Store(minValidTime)

View file

@ -877,7 +877,7 @@ func (s *memSeries) cutNewHeadChunk(mint int64, chunkDiskMapper chunkDiskMapper,
return s.headChunk
}
func (s *memSeries) cutNewOOOHeadChunk(mint int64, chunkDiskMapper *chunks.ChunkDiskMapper) (*oooHeadChunk, chunks.ChunkDiskMapperRef) {
func (s *memSeries) cutNewOOOHeadChunk(mint int64, chunkDiskMapper chunkDiskMapper) (*oooHeadChunk, chunks.ChunkDiskMapperRef) {
ref := s.mmapCurrentOOOHeadChunk(chunkDiskMapper)
s.oooHeadChunk = &oooHeadChunk{

View file

@ -644,7 +644,7 @@ func (c *safeChunk) Iterator(reuseIter chunkenc.Iterator) chunkenc.Iterator {
// iterator returns a chunk iterator for the requested chunkID, or a NopIterator if the requested ID is out of range.
// It is unsafe to call this concurrently with s.append(...) without holding the series lock.
func (s *memSeries) iterator(id chunks.HeadChunkID, isoState *isolationState, chunkDiskMapper *chunks.ChunkDiskMapper, memChunkPool *sync.Pool, it chunkenc.Iterator) chunkenc.Iterator {
func (s *memSeries) iterator(id chunks.HeadChunkID, isoState *isolationState, chunkDiskMapper chunkDiskMapper, memChunkPool *sync.Pool, it chunkenc.Iterator) chunkenc.Iterator {
c, garbageCollect, err := s.chunk(id, chunkDiskMapper, memChunkPool)
// TODO(fabxc): Work around! An error will be returns when a querier have retrieved a pointer to a
// series's chunk, which got then garbage collected before it got