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

Drop redundant CpuBoundWork usage in JsonRpcConnection::Disconnect() #9992

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

yhabteab
Copy link
Member

@yhabteab yhabteab commented Feb 8, 2024

Although there is locking involved here, it shoudln't take too long for the thread to actually acquire it, since there aren't that many threads dealing with endpoint clients concurrently. It's just wasting pointless time trying to obtain a CPU slot.

refs #9988

Although there is locking involved here, it shoudln't take too long for
the thread to actually acquire it, since there aren't that many threads
dealing with endpoint clients concurrently. It's just wasting pointless
time trying to obtain a CPU slot.
@yhabteab yhabteab added area/distributed Distributed monitoring (master, satellites, clients) core/quality Improve code, libraries, algorithms, inline docs ref/IP consider backporting Should be considered for inclusion in a bugfix release labels Feb 8, 2024
@cla-bot cla-bot bot added the cla/signed label Feb 8, 2024
@icinga-probot icinga-probot bot added the area/api REST API label Feb 8, 2024
@yhabteab yhabteab removed the area/api REST API label Feb 8, 2024
Copy link
Member

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

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

It's not as trivial as you might think. Endpoint::RemoveClient calls Endpoint::OnDisconnected which calls EndpointDbObject::UpdateConnectedStatus which calls DbObject::OnQuery. But this just enqueues stuff – should be fine.

@julianbrost
Copy link
Contributor

Endpoint::RemoveClient calls Endpoint::OnDisconnected which calls EndpointDbObject::UpdateConnectedStatus which calls DbObject::OnQuery. But this just enqueues stuff – should be fine.

Also, the corresponding Endpoint::AddClient() does pretty much the same and is doing it without CpuBoundWork already.

@julianbrost julianbrost merged commit 2be08aa into master Feb 13, 2024
25 checks passed
@julianbrost julianbrost deleted the remove-redundat-cpu-bound-work branch February 13, 2024 14:51
@julianbrost julianbrost added this to the 2.15.0 milestone Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distributed Distributed monitoring (master, satellites, clients) cla/signed consider backporting Should be considered for inclusion in a bugfix release core/quality Improve code, libraries, algorithms, inline docs ref/IP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants