Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for nil on expire expanded postings #6521

Merged

Conversation

alanprot
Copy link
Member

@alanprot alanprot commented Jan 17, 2025

What this PR does:
Adding a test case for #6518

=== RUN   TestIngesterDeletionRace
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0xf0 pc=0x1016cba4c]

goroutine 177 [running]:
github.com/cortexproject/cortex/pkg/ingester.(*Ingester).expirePostingsCache(0x14000d4d908, {0x102160e90, 0x1400004d9f0})
	/Users/approtas/workspace/cortex/pkg/ingester/ingester.go:2814 +0x3c
github.com/cortexproject/cortex/pkg/ingester.(*Ingester).starting.NewTimerService.func2({0x102160e90, 0x1400004d9f0})
	/Users/approtas/workspace/cortex/pkg/util/services/services.go:33 +0xd0
github.com/cortexproject/cortex/pkg/util/services.(*BasicService).main(0x14000ae41e0)
	/Users/approtas/workspace/cortex/pkg/util/services/basic_service.go:190 +0x170
created by github.com/cortexproject/cortex/pkg/util/services.(*BasicService).StartAsync.func1 in goroutine 154
	/Users/approtas/workspace/cortex/pkg/util/services/basic_service.go:119 +0xfc

Which issue(s) this PR fixes:
Fixes #

Checklist

  • [NA] Tests updated
  • [NA] Documentation added
  • [NA] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@alanprot alanprot force-pushed the fix/nil-expanded-postings-test branch from cfe8317 to 605381d Compare January 17, 2025 19:48
Signed-off-by: alanprot <[email protected]>
@alanprot alanprot force-pushed the fix/nil-expanded-postings-test branch 3 times, most recently from 3cbaf86 to e1698d1 Compare January 21, 2025 00:27
@alanprot alanprot force-pushed the fix/nil-expanded-postings-test branch from e1698d1 to d71687b Compare January 21, 2025 00:28
@alanprot alanprot merged commit 4477add into cortexproject:master Jan 22, 2025
17 checks passed
alexqyle pushed a commit to alexqyle/cortex that referenced this pull request Jan 31, 2025
* Test for nil on expire expanded postings

Signed-off-by: alanprot <[email protected]>

* stopping ingester

Signed-off-by: alanprot <[email protected]>

* refactor the test to not timeout

Signed-off-by: alanprot <[email protected]>

---------

Signed-off-by: alanprot <[email protected]>
Signed-off-by: Alex Le <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants