)]}'
{"networking_bgpvpn/neutron/services/service_drivers/driver_api.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d97ed8f9232b7dcdb320de68cfda9ccce5fb7b8b","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":104,"context_line":"            bgpvpn \u003d self.bgpvpn_db.create_bgpvpn("},{"line_number":105,"context_line":"                context, bgpvpn)"},{"line_number":106,"context_line":"            self.create_bgpvpn_precommit(context, bgpvpn)"},{"line_number":107,"context_line":"        self.create_bgpvpn_postcommit(context, bgpvpn)"},{"line_number":108,"context_line":"        return bgpvpn"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_3008722d","line":106,"updated":"2016-03-22 11:19:59.000000000","message":"Shouldn\u0027t the db context passed to the drievr in precommit be the context in which the bgpvpn has been created ?\n\nIf the driver wants to look up the db, or does a show_bgpvpn, it may not find the bgpvpn that has been created.\n\nI\u0027m not sure there is any significant implication, because the driver would typicallly use the bgpvpn dict passed in the call rather than lookup in the DB...","commit_id":"7444ff9a7f35e73009fc40e85ba817a9e418f726"},{"author":{"_account_id":2888,"name":"Mathieu Rohon","email":"mathieu.rohon@gmail.com","username":"mathieu-rohon"},"change_message_id":"5f20d6feff9ec91e3ab3e6e414f78b50199cf94f","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":104,"context_line":"            bgpvpn \u003d self.bgpvpn_db.create_bgpvpn("},{"line_number":105,"context_line":"                context, bgpvpn)"},{"line_number":106,"context_line":"            self.create_bgpvpn_precommit(context, bgpvpn)"},{"line_number":107,"context_line":"        self.create_bgpvpn_postcommit(context, bgpvpn)"},{"line_number":108,"context_line":"        return bgpvpn"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_652b4295","line":106,"in_reply_to":"fa0719c6_3008722d","updated":"2016-03-22 13:21:43.000000000","message":"The idea is not to have the entry in the DB until the precommit call has been processed. So the driver will have to rely on informations passed through precommit args.\n\nThis is also useful if the driver wants to store any information in the DB. It will use a subtransaction in the same db session, so everything addition/update of the db will be committed in a raw. If there is a db issue (concurrent write), nothing is committed and the error is returned to the client.\n\nThis way one don\u0027t have to roll back entries written in the DB. This is largely inspired by what is done in ML2.","commit_id":"7444ff9a7f35e73009fc40e85ba817a9e418f726"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"4b63504c65f3bf4dc2c1a172b687df7677bffc82","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":104,"context_line":"            bgpvpn \u003d self.bgpvpn_db.create_bgpvpn("},{"line_number":105,"context_line":"                context, bgpvpn)"},{"line_number":106,"context_line":"            self.create_bgpvpn_precommit(context, bgpvpn)"},{"line_number":107,"context_line":"        self.create_bgpvpn_postcommit(context, bgpvpn)"},{"line_number":108,"context_line":"        return bgpvpn"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_5a509c5e","line":106,"in_reply_to":"fa0719c6_652b4295","updated":"2016-03-22 13:55:08.000000000","message":"Sorry, I misread the code.\n\nIndeed, the code already probably does what I had in mind: the driver will get the context with a subtransaction started.","commit_id":"7444ff9a7f35e73009fc40e85ba817a9e418f726"}]}
