]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Mute neutron.callbacks notification logs.
authorMiguel Angel Ajo <mangelajo@redhat.com>
Wed, 15 Jul 2015 13:42:52 +0000 (15:42 +0200)
committerMiguel Angel Ajo <mangelajo@redhat.com>
Wed, 15 Jul 2015 15:26:48 +0000 (17:26 +0200)
We believe they could be the source of some yielding,
and consequient DBDeadlocks we're experiencing when using
AFTER_READ to extend resources.

This will need to be revised.

Change-Id: I040b3a3c9e137267dfe237dd90fb525026b0d16e

neutron/callbacks/manager.py

index 4927ff337f6b656300b4262388a8adbe2c2ae5af..8d32ff7efa36959d9c9679020923a69d11a5d76a 100644 (file)
@@ -131,14 +131,22 @@ class CallbacksManager(object):
 
     def _notify_loop(self, resource, event, trigger, **kwargs):
         """The notification loop."""
-        LOG.debug("Notify callbacks for %(resource)s, %(event)s",
-                  {'resource': resource, 'event': event})
+
+        #TODO(QoS): we found callback logs happening in the middle
+        #           of transactions being a source of DBDeadLocks
+        #           because they can yield. (Can LOG writes yield?,
+        #           please revisit this).
+        #
+        #LOG.debug("Notify callbacks for %(resource)s, %(event)s",
+        #          {'resource': resource, 'event': event})
 
         errors = []
         # TODO(armax): consider using a GreenPile
         for callback_id, callback in self._callbacks[resource][event].items():
             try:
-                LOG.debug("Calling callback %s", callback_id)
+                #TODO(QoS): muting logs for the reasons explained in the
+                #           previous TODO(QoS)
+                #LOG.debug("Calling callback %s", callback_id)
                 callback(resource, event, trigger, **kwargs)
             except Exception as e:
                 LOG.exception(_LE("Error during notification for "