Skip to content

tsdb: make panic lock-release test OS agnostic - #19339

Merged
krajorama merged 3 commits into
prometheus:mainfrom
JustDaile:osagnostictests
Aug 13, 2026
Merged

tsdb: make panic lock-release test OS agnostic#19339
krajorama merged 3 commits into
prometheus:mainfrom
JustDaile:osagnostictests

Conversation

@JustDaile

@JustDaile JustDaile commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The old test forced a chunk write failure by removing the mmapped chunk directory which
will not work on Windows, as directories with open files cannot be deleted.
This change instead injects a rogue chunk segment with a higher sequence number,
causing the next chunk write to fail through the same code path in an OS-independent way.
This allows the test to run on Windows while exercising the same panic and lock-release behavior.

NONE

@JustDaile
JustDaile force-pushed the osagnostictests branch 2 times, most recently from 32d3fc1 to 404b039 Compare August 5, 2026 18:07
Signed-off-by: Daile Alimo <daile.alimo1991@hotmail.com>
@JustDaile JustDaile changed the title make panic lock-release test OS agnostic - remove windows guard tsdb: make panic lock-release test OS agnostic Aug 5, 2026

@krajorama krajorama left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for your interest in the project, I have some comments.

Comment thread tsdb/head_test.go Outdated
Comment thread tsdb/head_test.go Outdated
Signed-off-by: Daile Alimo <daile.alimo1991@hotmail.com>
Signed-off-by: Daile Alimo <daile.alimo1991@hotmail.com>

@krajorama krajorama left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@krajorama
krajorama merged commit fd5c79c into prometheus:main Aug 13, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants