Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Add deadlock prevention during metric registration#1079

Open
suligap wants to merge 2 commits intoprometheus:master from
suligap:deadlock-prevention
Open

Add deadlock prevention during metric registration #1079
suligap wants to merge 2 commits intoprometheus:master from
suligap:deadlock-prevention

Conversation

@suligap
Copy link
Contributor

@suligap suligap commented Dec 3, 2024

Detect deadlocks during the library misuse, eg. by injecting code into the critical sections that itself might want to obtain the relevant lock.

A follow up to #1076.

Copy link
Member

Just want to say I have been busy this week and am out next week, but I will get to this, and thank you for your contributions!

Detects and prevents deadlocks during the library misuse, eg. by
injecting code into the critical sections that itself might want to
obtain the relevant lock.
A follow up to prometheus#1076.
Signed-off-by: Przemysław Suliga <mail@suligap.net>
It's hard to justify the overhead of double locking there.
Signed-off-by: Przemysław Suliga <mail@suligap.net>
@suligap suligap changed the title (削除) Add deadlock detection (削除ここまで) (追記) Add deadlock prevention during metric registration (追記ここまで) Dec 8, 2024
Copy link
Contributor Author

suligap commented Dec 8, 2024

No worries, nothing urgent here and thanks. I thought about it a bit more and ended up pulling out the deadlock prevention from the "hottest" path: metrics.py and values.py. It's quite hard to justify the overhead of this double locking approach there. But I think it's not an issue in registry.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /