Comment 2 for bug 1474943

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/202202
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=02a3a398145c4923915f7eaa5e601d6f970df403
Submitter: Jenkins
Branch: master

commit 02a3a398145c4923915f7eaa5e601d6f970df403
Author: Joshua Harlow <email address hidden>
Date: Wed Jul 15 10:26:06 2015 -0700

    Ensure callback variable capture + cleanup is done correctly

    It appears the the callback variable that was being called on
    future done was not the right one, due to the lambda capture
    mechanism referring to a lazy variable which would potentially
    be a different callback by the time the future would finish so
    make sure we capture the right one and ensure the future has access
    to it.

    This adds a helper method that submission will go through
    to ensure that the callback variable is correctly captured
    in the created lambda and also ensures that the incomplete futures
    list is cleaned up (when the future is done).

    The notification listener tests use now eventlet to show up this
    issue that doesn't occur with blocking executor.

    Closes-bug: #1474943

    Closes-bug: #1475307

    Change-Id: I23e393d504662532572b5b344b87387be6d7bcb1