commit 901fb4542154ff25c7be6f62bacabbdbd3f57b11
Author: Matt Riedemann <email address hidden>
Date: Wed Dec 12 12:32:23 2018 -0500
Remove lock on SchedulerReportClient._create_client
This is a follow up to change Idf6e548d725db0181629a451f46b6a3a5850d186
where the compute API started lazy-loading the SchedulerReportClient
because of slow startup times, presumably because of the locking
when creating SchedulerReportClient.
The lock on SchedulerReportClient._create_client is removed
since there is no clear indication that it is necessary. It was
added in change I02ac615dc26a4a0d1fd28a638f622777e41d14e4 as a
precaution:
"I've made the _client method synchronized so that in the unlikely event
that the resource tracker is trying to do its update job while some
other thing is happening, we won't waste the client. This may not be
necessary, but probably doesn't harm anything."
Long-term we could consider making SchedulerReportClient a global
singleton so a TODO is left for that since it would require inspecting
cache-sensitive methods to see if a lock is necessary.
Reviewed: https:/ /review. openstack. org/624770 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=901fb454215 4ff25c7be6f62ba cabbdbd3f57b11
Committed: https:/
Submitter: Zuul
Branch: master
commit 901fb4542154ff2 5c7be6f62bacabb dbd3f57b11
Author: Matt Riedemann <email address hidden>
Date: Wed Dec 12 12:32:23 2018 -0500
Remove lock on SchedulerReport Client. _create_ client
This is a follow up to change Idf6e548d725db0 181629a451f46b6 a3a5850d186 Client Client.
where the compute API started lazy-loading the SchedulerReport
because of slow startup times, presumably because of the locking
when creating SchedulerReport
The lock on SchedulerReport Client. _create_ client is removed 0d1fd28a638f622 777e41d14e4 as a
since there is no clear indication that it is necessary. It was
added in change I02ac615dc26a4a
precaution:
"I've made the _client method synchronized so that in the unlikely event
that the resource tracker is trying to do its update job while some
other thing is happening, we won't waste the client. This may not be
necessary, but probably doesn't harm anything."
Long-term we could consider making SchedulerReport Client a global
singleton so a TODO is left for that since it would require inspecting
cache-sensitive methods to see if a lock is necessary.
Change-Id: I127e8b78c0dfd5 c42a1e1f509dc4f ca1af3d5f89
Related-Bug: #1807219
Related-Bug: #1806912