Comment 4 for bug 1807219

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/624770
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=901fb4542154ff25c7be6f62bacabbdbd3f57b11
Submitter: Zuul
Branch: master

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.

    Change-Id: I127e8b78c0dfd5c42a1e1f509dc4fca1af3d5f89
    Related-Bug: #1807219
    Related-Bug: #1806912