)]}'
{"neutron/db/l3_db.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"40bf72c0cf8a8e412ec636071e265a708548ee6d","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                         \u0027name\u0027: \u0027\u0027}"},{"line_number":317,"context_line":"            gw_port \u003d p_utils.create_port(self._core_plugin,"},{"line_number":318,"context_line":"                                          context.elevated(),"},{"line_number":319,"context_line":"                                          {\u0027port\u0027: port_data})"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"            if not gw_port[\u0027fixed_ips\u0027]:"},{"line_number":322,"context_line":"                LOG.debug(\u0027No IPs available for external network %s\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_41421369","line":319,"updated":"2016-04-07 07:09:35.000000000","message":"we usually try to avoid calling backend within the transaction.\nit can yield inconsistency on a rollback.","commit_id":"537b65e0d564103b95ccbc27191f62dbfaf85aaf"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"9f5f95094f7beb1882fb7a33637005f98074d9b7","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                         \u0027name\u0027: \u0027\u0027}"},{"line_number":317,"context_line":"            gw_port \u003d p_utils.create_port(self._core_plugin,"},{"line_number":318,"context_line":"                                          context.elevated(),"},{"line_number":319,"context_line":"                                          {\u0027port\u0027: port_data})"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"            if not gw_port[\u0027fixed_ips\u0027]:"},{"line_number":322,"context_line":"                LOG.debug(\u0027No IPs available for external network %s\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_7760b501","line":319,"in_reply_to":"9a061dce_41421369","updated":"2016-04-07 07:48:51.000000000","message":"However, in this case [1]. This will prevent multiple gateway ports can add a router when running commands at the same time. When this bug occur, we will lose two IP-provider (those IP-provider cannot use).\n\n[1]https://bugs.launchpad.net/neutron/+bug/1535225","commit_id":"537b65e0d564103b95ccbc27191f62dbfaf85aaf"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"40bf72c0cf8a8e412ec636071e265a708548ee6d","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                LOG.debug(\u0027No IPs available for external network %s\u0027,"},{"line_number":323,"context_line":"                          network_id)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":326,"context_line":"                router.gw_port \u003d self._core_plugin._get_port("},{"line_number":327,"context_line":"                    context.elevated(), gw_port[\u0027id\u0027])"},{"line_number":328,"context_line":"                router_port \u003d RouterPort("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_816f0b2a","line":325,"updated":"2016-04-07 07:09:35.000000000","message":"is this subtransaction necessary?","commit_id":"537b65e0d564103b95ccbc27191f62dbfaf85aaf"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"9f5f95094f7beb1882fb7a33637005f98074d9b7","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                LOG.debug(\u0027No IPs available for external network %s\u0027,"},{"line_number":323,"context_line":"                          network_id)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":326,"context_line":"                router.gw_port \u003d self._core_plugin._get_port("},{"line_number":327,"context_line":"                    context.elevated(), gw_port[\u0027id\u0027])"},{"line_number":328,"context_line":"                router_port \u003d RouterPort("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_b7188d1f","line":325,"in_reply_to":"9a061dce_816f0b2a","updated":"2016-04-07 07:48:51.000000000","message":"Yes, I will test again. If this is not neccesary, I will delete it.","commit_id":"537b65e0d564103b95ccbc27191f62dbfaf85aaf"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"40bf72c0cf8a8e412ec636071e265a708548ee6d","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                context.session.add(router)"},{"line_number":334,"context_line":"                context.session.add(router_port)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    def _lock_router(self, context, router_id):"},{"line_number":337,"context_line":"        \"\"\"Lock router associated row."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        This method disallows to allocate concurrently 2 add interface"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_140cd739","line":336,"updated":"2016-04-07 07:09:35.000000000","message":"this seems like a complicated way to lock the row.\nwhat\u0027s an advantage over eg. select for update?","commit_id":"537b65e0d564103b95ccbc27191f62dbfaf85aaf"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"5237cea0161eb21f4d36a5d4e39ebd9d317ab6fa","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                context.session.add(router)"},{"line_number":334,"context_line":"                context.session.add(router_port)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    def _lock_router(self, context, router_id):"},{"line_number":337,"context_line":"        \"\"\"Lock router associated row."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        This method disallows to allocate concurrently 2 add interface"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a18252c_6636b753","line":336,"in_reply_to":"9a061dce_140cd739","updated":"2016-04-14 07:22:40.000000000","message":"Hi YAMAMOTO Takashi. After I searched for your suggest, I have two conclusion:\n\n1. \"Select for update\" is solution to apply two areas: quota and IPAM however now, nova and neutron projects use \"select and update\" [1]. This solution is better, to prevent deadlock when using cluster DB\n\n[1]http://www.joinfu.com/2015/01/understanding-reservations-concurrency-locking-in-nova/\n\n2. In my option, I use \"select and update\". This code use \"compare-and-swap/select and update\" [2]\n\n[2]https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L1098\n\nFor more detail, please refer to: \nhttps://review.openstack.org/#/c/143837/\nhttps://review.openstack.org/#/c/153558/","commit_id":"537b65e0d564103b95ccbc27191f62dbfaf85aaf"},{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"9f5f95094f7beb1882fb7a33637005f98074d9b7","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                context.session.add(router)"},{"line_number":334,"context_line":"                context.session.add(router_port)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    def _lock_router(self, context, router_id):"},{"line_number":337,"context_line":"        \"\"\"Lock router associated row."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        This method disallows to allocate concurrently 2 add interface"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_12cd07b7","line":336,"in_reply_to":"9a061dce_140cd739","updated":"2016-04-07 07:48:51.000000000","message":"Thanks for your suggest. I will research this solution and please give me some link about it if you are willing.","commit_id":"537b65e0d564103b95ccbc27191f62dbfaf85aaf"}],"neutron/db/migration/alembic_migrations/versions/mitaka/expand/eaad226d717b_router_hash.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b2ea5a1483060c651c8752cfb5d0033c0c0e759f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1af94dfe_ef87c4b2","updated":"2016-03-18 14:37:15.000000000","message":"This must now go in the newton versions directory.","commit_id":"d6e1d3ca07de7969c2866672997078f884649cdc"}]}
