Skip to content

Freeze perfdata arrays and remove locks in code using them#10857

Open
jschmidt-icinga wants to merge 1 commit into
masterfrom
freeze-perfdata-arrays
Open

Freeze perfdata arrays and remove locks in code using them#10857
jschmidt-icinga wants to merge 1 commit into
masterfrom
freeze-perfdata-arrays

Conversation

@jschmidt-icinga
Copy link
Copy Markdown
Contributor

Since perfdata is set once when a check result is created and never changed again, locking this Array is unnecessary. This avoids components unnecessarily waiting on each other when processing perfdata by freezing it in CheckResult::SetPerformanceData().

This fixes the locking cascade observed sometimes when the perfdata writer work queue blocks, where it extends to a lock on the entire check result eventually, affecting even more components.

Fixes #10848.

Since perfdata is set once when a check result is created and
never changed again, locking this is unnecessary. This avoids
components unnecessarily waiting on each other when processing
perfdata.

This fixes the locking cascade observed sometimes when the perfdata
writer work queue blocks, where it extends to a lock on the entire
check result eventually, affecting even more components.
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.

A lot of checks are marked as overdue, but checks are actually run by icinga

1 participant