)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"099ccb2b1ff41fc6a114b4132f2d45fabfaba9c5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The NSX sync backend previously passed around a sqlalchemy model object"},{"line_number":10,"context_line":"around which was nice because we did not need to query the database an"},{"line_number":11,"context_line":"additional time to update the status of an object. Unfortinately, this"},{"line_number":12,"context_line":"was add done within a db transaction which included a call to NSX which"},{"line_number":13,"context_line":"could cause deadlock this needed to be removed. Now a dict is passed around"},{"line_number":14,"context_line":"instead an proper transaction handling is used when updating objects."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAVn%2F%2F5ec%3D","line":11,"updated":"2014-03-03 15:19:33.000000000","message":"unfortinately -\u003e unfortunately\n(also a newline would be probably good here)","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"d5f5febba0e553e1e14c894d1d5e81690adb3c2e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The NSX sync backend previously passed around a sqlalchemy model object"},{"line_number":10,"context_line":"around which was nice because we did not need to query the database an"},{"line_number":11,"context_line":"additional time to update the status of an object. Unfortinately, this"},{"line_number":12,"context_line":"was add done within a db transaction which included a call to NSX which"},{"line_number":13,"context_line":"could cause deadlock this needed to be removed. Now a dict is passed around"},{"line_number":14,"context_line":"instead an proper transaction handling is used when updating objects."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAVn%2F%2F1Es%3D","line":11,"in_reply_to":"AAAAVn%2F%2F5ec%3D","updated":"2014-03-17 22:48:56.000000000","message":"Done","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"099ccb2b1ff41fc6a114b4132f2d45fabfaba9c5","unresolved":false,"context_lines":[{"line_number":11,"context_line":"additional time to update the status of an object. Unfortinately, this"},{"line_number":12,"context_line":"was add done within a db transaction which included a call to NSX which"},{"line_number":13,"context_line":"could cause deadlock this needed to be removed. Now a dict is passed around"},{"line_number":14,"context_line":"instead an proper transaction handling is used when updating objects."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Id50abd8f2143b127d1ca81c360c1c6d400e1d74f"},{"line_number":17,"context_line":"Closes-bug: #1281772"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAVn%2F%2F5eE%3D","line":14,"updated":"2014-03-03 15:19:33.000000000","message":"not sure about this, but perhaps you meant \u0027and\u0027 instead of \u0027an\u0027?","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"d5f5febba0e553e1e14c894d1d5e81690adb3c2e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"additional time to update the status of an object. Unfortinately, this"},{"line_number":12,"context_line":"was add done within a db transaction which included a call to NSX which"},{"line_number":13,"context_line":"could cause deadlock this needed to be removed. Now a dict is passed around"},{"line_number":14,"context_line":"instead an proper transaction handling is used when updating objects."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Id50abd8f2143b127d1ca81c360c1c6d400e1d74f"},{"line_number":17,"context_line":"Closes-bug: #1281772"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAVn%2F%2F1Ek%3D","line":14,"in_reply_to":"AAAAVn%2F%2F5eE%3D","updated":"2014-03-17 22:48:56.000000000","message":"Done","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"}],"neutron/plugins/nicira/common/sync.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"099ccb2b1ff41fc6a114b4132f2d45fabfaba9c5","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            # do nothing"},{"line_number":282,"context_line":"            return"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":285,"context_line":"            try:"},{"line_number":286,"context_line":"                network \u003d self._plugin._get_network(context,"},{"line_number":287,"context_line":"                                                    neutron_network_data[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5cQ%3D","line":284,"updated":"2014-03-03 15:19:33.000000000","message":"Instead of doing get/update which results in 2 statements which you need to wrap into a transaction, I would just consider issuing an update statement without syncing with the current session (just to be more efficient as it does not really matter if the object has been deleted in the meanwhile)","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"d5f5febba0e553e1e14c894d1d5e81690adb3c2e","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            # do nothing"},{"line_number":282,"context_line":"            return"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":285,"context_line":"            try:"},{"line_number":286,"context_line":"                network \u003d self._plugin._get_network(context,"},{"line_number":287,"context_line":"                                                    neutron_network_data[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2B%2BJI%3D","line":284,"in_reply_to":"AAAAVn%2F%2F5cQ%3D","updated":"2014-03-17 22:48:56.000000000","message":"Checkout update_network() this does the same thing though it avoid additional calls there.","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"099ccb2b1ff41fc6a114b4132f2d45fabfaba9c5","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                LOG.debug(_(\"Updating status for neutron resource %(q_id)s to:\""},{"line_number":293,"context_line":"                            \" %(status)s\"),"},{"line_number":294,"context_line":"                          {\u0027q_id\u0027: neutron_network_data[\u0027id\u0027],"},{"line_number":295,"context_line":"                           \u0027status\u0027: status})"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _synchronize_lswitches(self, ctx, ls_uuids, scan_missing\u003dFalse):"},{"line_number":298,"context_line":"        if not ls_uuids and not scan_missing:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5dU%3D","line":295,"updated":"2014-03-03 15:19:33.000000000","message":"not sure why we\u0027d need the try..else here.\nI think you can have everything within the try block as line 286 is the only one which can possibly trigger NoResultFound\n\nHowever, this is a minor style point, so do as you think it\u0027s better.","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"d5f5febba0e553e1e14c894d1d5e81690adb3c2e","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                LOG.debug(_(\"Updating status for neutron resource %(q_id)s to:\""},{"line_number":293,"context_line":"                            \" %(status)s\"),"},{"line_number":294,"context_line":"                          {\u0027q_id\u0027: neutron_network_data[\u0027id\u0027],"},{"line_number":295,"context_line":"                           \u0027status\u0027: status})"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _synchronize_lswitches(self, ctx, ls_uuids, scan_missing\u003dFalse):"},{"line_number":298,"context_line":"        if not ls_uuids and not scan_missing:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2B%2BIM%3D","line":295,"in_reply_to":"AAAAVn%2F%2F5dU%3D","updated":"2014-03-17 22:48:56.000000000","message":"in general you only what to Try/except around code that is going to raise. Blame Maru :)","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"099ccb2b1ff41fc6a114b4132f2d45fabfaba9c5","unresolved":false,"context_lines":[{"line_number":363,"context_line":"            # do nothing"},{"line_number":364,"context_line":"            return"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":367,"context_line":"            try:"},{"line_number":368,"context_line":"                router \u003d self._plugin._get_router(context,"},{"line_number":369,"context_line":"                                                  neutron_router_data[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5b4%3D","line":366,"updated":"2014-03-03 15:19:33.000000000","message":"The same 2 comments above apply to this block as well","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"099ccb2b1ff41fc6a114b4132f2d45fabfaba9c5","unresolved":false,"context_lines":[{"line_number":458,"context_line":"            # do nothing"},{"line_number":459,"context_line":"            return"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":462,"context_line":"            try:"},{"line_number":463,"context_line":"                port \u003d self._plugin._get_port(context,"},{"line_number":464,"context_line":"                                              neutron_port_data[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5bk%3D","line":461,"updated":"2014-03-03 15:19:33.000000000","message":"And I think those comments apply here too","commit_id":"e46ceb668e6b1be6a0b509a1ec5ad8421154375d"}]}
