]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add effective note on DB exception to be aware of
authorarmando-migliaccio <armamig@gmail.com>
Thu, 22 Oct 2015 01:10:24 +0000 (18:10 -0700)
committerarmando-migliaccio <armamig@gmail.com>
Thu, 22 Oct 2015 01:10:24 +0000 (18:10 -0700)
Change-Id: I249b0dcf8d5ebff3c6b72c0e4deb270f0275d3a4

doc/source/devref/effective_neutron.rst

index 3f6333afa3a348813d6ba2481615d3275013b5e1..bc092e28b47ef5fc3a683b00d1b72e364f6b5874 100644 (file)
@@ -98,6 +98,12 @@ Document common pitfalls as well as good practices done during database developm
 
      q = query(Object.id, Object.name,
                func.count(Object.number)).group_by(Object.id, Object.name)
+* Beware of the `InvalidRequestError <http://docs.sqlalchemy.org/en/rel_0_8/faq.html#this-session-s-transaction-has-been-rolled-back-due-to-a-previous-exception-during-flush-or-similar>`_ exception.
+  There is even a `Neutron bug <https://bugs.launchpad.net/neutron/+bug/1409774>`_
+  registered for it. Bear in mind that this error may also occur when nesting
+  transaction blocks, and the innermost block raises an error without proper
+  rollback. Consider if `savepoints <http://docs.sqlalchemy.org/en/rel_1_0/orm/session_transaction.html#using-savepoint>`_
+  can fit your use case.
 
 System development
 ~~~~~~~~~~~~~~~~~~