]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove dependency on weak reference for registry callbacks
authorarmando-migliaccio <armamig@gmail.com>
Tue, 21 Apr 2015 23:47:09 +0000 (16:47 -0700)
committerarmando-migliaccio <armamig@gmail.com>
Wed, 22 Apr 2015 21:29:40 +0000 (14:29 -0700)
commit8959032dfb195ba3836e50fbccecbfedb9164038
tree74de045c909378fd6d83f5b4949172aac29b96f9
parent76d873a452e340944e2e3242e8bb1722e3c036e8
Remove dependency on weak reference for registry callbacks

The use of weakref was introduced as a preventive measure to avoid
potential OOM kills, however that limited our ability to employ
certain functions as callbacks, such as object methods (see [1] for
an example).

Since the adoption of the callback registry, it has been observed that
callbacks are generally long lived (for the entire duration of the
process they belong to), therefore this limitation appears to be too
restrictive at this point in time.

Some might argue that it's better safe than sorry, but until we
have some evidence of actual OOM kills, it's probably best to take
the bolder action of removing the adoption of weak references and
deal with the potential fallout, should it happen.

[1] https://review.openstack.org/#/c/175179/

Change-Id: Idcd0286fc4235af82901c8a17ea45bc758b62b37
doc/source/devref/callbacks.rst
neutron/callbacks/manager.py