cachedproperty needs to be made thread-safe (by default)

Bug #1366156 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
taskflow
Fix Released
Medium
Joshua Harlow
0.5
New
Undecided
Unassigned

Bug Description

When the cachedproperty descriptor is used in multi-threaded situations we need to be careful about multiple threads attempting to fetch and set the property that should be only created once. Currently it seems like multiple threads could call into the property and attempt to set multiple of the properties (which would be bad). Due to how cachedproperty is used (not in multi-threaded regions) we are likely not at high risk but it would be great to correct this.

Joshua Harlow (harlowja)
Changed in taskflow:
importance: Undecided → Medium
Joshua Harlow (harlowja)
Changed in taskflow:
assignee: nobody → Joshua Harlow (harlowja)
status: New → In Progress
Joshua Harlow (harlowja)
Changed in taskflow:
milestone: none → next-juno
Changed in taskflow:
milestone: next-juno → next-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to taskflow (master)

Reviewed: https://review.openstack.org/119443
Committed: https://git.openstack.org/cgit/openstack/taskflow/commit/?id=a96f49b9a5c73985187e75ba4eba6b946875c92a
Submitter: Jenkins
Branch: master

commit a96f49b9a5c73985187e75ba4eba6b946875c92a
Author: Joshua Harlow <email address hidden>
Date: Fri Sep 5 11:50:22 2014 -0700

    Ensure the cachedproperty creation/setting is thread-safe

    When the cachedproperty descriptor is attached to an object
    that needs to be only created/set by one thread at a time we
    should ensure that this is done safely by using a lock to
    prevent multiple threads from creating and assigning the
    associated attribute.

    Fixes bug 1366156

    Change-Id: I0545683f83402097f54c34a6b737904e6edd85b3

Changed in taskflow:
status: In Progress → Fix Committed
Joshua Harlow (harlowja)
Changed in taskflow:
status: Fix Committed → Fix Released
Joshua Harlow (harlowja)
Changed in taskflow:
milestone: next-kilo → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.