Comment 18 for bug 1520719

Revision history for this message
Henry Gessau (gessau) wrote : Re: [RFE]Use the new enginefacade from oslo_db

Summary of chat with zzzeek...

The purpose is to get rid of patterns like we see in nova where there are tons of get_session() calls, all nested, each one using a totally separate transaction. The job of acquiring session / transaction scope goes away, is hidden away in one place, the application needs only declare its needs per method. The spec notes that neutron already seems to have a very succinct pattern like this.

So Neutron doesn't really have the problem that nova has.

But there is still potential advantage in declaring methods as readers or writers.

Also the initial creational pattern in legacy enginefacade is expressed internally through the new API, so we might as well use the new API for the part where we first set things up.

And also use enginefacade's system to set up the "context.session" attribute.