Skip to content

Fix stability and resource hygiene regressions#7715

Open
Rohithmatham12 wants to merge 1 commit into
cortexproject:masterfrom
Rohithmatham12:fix/stability-resource-hygiene
Open

Fix stability and resource hygiene regressions#7715
Rohithmatham12 wants to merge 1 commit into
cortexproject:masterfrom
Rohithmatham12:fix/stability-resource-hygiene

Conversation

@Rohithmatham12

Copy link
Copy Markdown

Summary

  • add an idempotent FragmentTable Close method and stop the scheduler fragment-table cleanup goroutine during scheduler shutdown
  • make the query-eviction metric test wait for the async eviction counter increment before asserting
  • stop comparing live rule evaluation timestamps/durations against never-evaluated backup rules in ruler backup tests
  • make the gzip decompression-cap regression test use a valid oversized protobuf payload so removing the cap would make the test pass incorrectly

Issues
Fixes #7596.
Fixes #7604.
Fixes #7577.
Fixes #7581.

Testing

  • GOCACHE=/tmp/cortex-go-cache GOMODCACHE=/tmp/cortex-go-mod-cache go test -tags "netgo slicelabels" ./pkg/scheduler/fragment_table ./pkg/util/queryeviction ./pkg/util -run 'Test|TestPrometheusMetrics_IncrementedCorrectly|TestParseProtoReader_GzipDecompressionBomb'
  • GOCACHE=/tmp/cortex-go-cache GOMODCACHE=/tmp/cortex-go-mod-cache go test -tags "netgo slicelabels" ./pkg/ruler -run 'TestGetRulesFromBackup|TestGetRules_HA' -count=20
  • GOCACHE=/tmp/cortex-go-cache GOMODCACHE=/tmp/cortex-go-mod-cache go test -tags "netgo slicelabels" ./pkg/scheduler ./pkg/scheduler/fragment_table
  • GOCACHE=/tmp/cortex-go-cache GOMODCACHE=/tmp/cortex-go-mod-cache go test -tags "netgo slicelabels" ./pkg/util/queryeviction -run TestPrometheusMetrics_IncrementedCorrectly -count=200
  • git diff --check

Signed-off-by: Rohithmatham12 <rohithmatham@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment