)]}'
{"neutron/db/securitygroups_db.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"46bd726bd1ed62f34be42173c95146d437ae50b7","unresolved":false,"context_lines":[{"line_number":662,"context_line":"                         \u0027description\u0027: _(\u0027Default security group\u0027)}"},{"line_number":663,"context_line":"                }"},{"line_number":664,"context_line":"                try:"},{"line_number":665,"context_line":"                    ret \u003d self.create_security_group("},{"line_number":666,"context_line":"                        context, security_group, default_sg\u003dTrue)"},{"line_number":667,"context_line":"                except exception.DBDuplicateEntry as ex:"},{"line_number":668,"context_line":"                    LOG.debug(\"Duplicate default security group %s was \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_5460c5ce","line":665,"updated":"2015-07-29 16:53:58.000000000","message":"_ensure_default_security_group is called under transaction anyway","commit_id":"f93e323839ebea4eca700a86f6af9dfe72b63478"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"85af3ff621e3578d006536a781ce15d779943aa2","unresolved":false,"context_lines":[{"line_number":662,"context_line":"                         \u0027description\u0027: _(\u0027Default security group\u0027)}"},{"line_number":663,"context_line":"                }"},{"line_number":664,"context_line":"                try:"},{"line_number":665,"context_line":"                    ret \u003d self.create_security_group("},{"line_number":666,"context_line":"                        context, security_group, default_sg\u003dTrue)"},{"line_number":667,"context_line":"                except exception.DBDuplicateEntry as ex:"},{"line_number":668,"context_line":"                    LOG.debug(\"Duplicate default security group %s was \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_75adb12f","line":665,"in_reply_to":"3a50d1a3_5460c5ce","updated":"2015-07-29 21:35:11.000000000","message":"A Neutron plugin may choose to override create_security_group in order to run backend nits and bits (i.e - create firewall rules), before or after calling on super.create_security_group.","commit_id":"f93e323839ebea4eca700a86f6af9dfe72b63478"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"3cf6edfac55c7cda293c7dc8a532ce3a185f004d","unresolved":false,"context_lines":[{"line_number":662,"context_line":"                         \u0027description\u0027: _(\u0027Default security group\u0027)}"},{"line_number":663,"context_line":"                }"},{"line_number":664,"context_line":"                try:"},{"line_number":665,"context_line":"                    ret \u003d self.create_security_group("},{"line_number":666,"context_line":"                        context, security_group, default_sg\u003dTrue)"},{"line_number":667,"context_line":"                except exception.DBDuplicateEntry as ex:"},{"line_number":668,"context_line":"                    LOG.debug(\"Duplicate default security group %s was \""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_283a6099","line":665,"updated":"2015-07-30 08:17:57.000000000","message":"Looks like this approach will not make things better because:\n\n1) the code would still call create_security_group under transaction - check it\u0027s usage.\n\n2) when it calls it under transaction, the logic in L664-669 will not work properly because changes in transaction in create_security_group will not be committed until parent transactio is committed.\nRemember that this logic is here to prevent race condition, so nested transaction is necessary, if we want this method to be usable within and outside a transaction","commit_id":"466de51ad64bc55c7762a6f1745d770d28132cd2"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"121779ae984283416cf2c8c2bf896d1da3e47c3d","unresolved":false,"context_lines":[{"line_number":662,"context_line":"                         \u0027description\u0027: _(\u0027Default security group\u0027)}"},{"line_number":663,"context_line":"                }"},{"line_number":664,"context_line":"                try:"},{"line_number":665,"context_line":"                    ret \u003d self.create_security_group("},{"line_number":666,"context_line":"                        context, security_group, default_sg\u003dTrue)"},{"line_number":667,"context_line":"                except exception.DBDuplicateEntry as ex:"},{"line_number":668,"context_line":"                    LOG.debug(\"Duplicate default security group %s was \""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_3854cb1f","line":665,"in_reply_to":"3a50d1a3_283a6099","updated":"2015-07-30 20:30:16.000000000","message":"Ok, Thank you for elaborating!","commit_id":"466de51ad64bc55c7762a6f1745d770d28132cd2"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"85866ebdecd4024e99a13a5175c08236ab4558cb","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                         \u0027description\u0027: _(\u0027Default security group\u0027)}"},{"line_number":664,"context_line":"                }"},{"line_number":665,"context_line":"                try:"},{"line_number":666,"context_line":"                    ret \u003d self.create_security_group("},{"line_number":667,"context_line":"                        context, security_group, default_sg\u003dTrue)"},{"line_number":668,"context_line":"                except exception.DBDuplicateEntry as ex:"},{"line_number":669,"context_line":"                    LOG.debug(\"Duplicate default security group %s was \""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_fc189020","line":666,"updated":"2015-07-31 00:41:34.000000000","message":"this has exactly the same issue as previous patchset.\nTo see the result of internal transaction we need to have a \u0027savepoint\u0027 - this is what nested transaction is about.\n\nSo in case adding sg will result in DBDuplicateEntry, this will be thrown only on commit of the parent tx, and not from create_security_group itself","commit_id":"e44c149a2ac6ad7eb7a639cc6b361ed696d4340c"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"d6e3233b5bfe0d71c8538e3ac9798190a5ebc80b","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                         \u0027description\u0027: _(\u0027Default security group\u0027)}"},{"line_number":664,"context_line":"                }"},{"line_number":665,"context_line":"                try:"},{"line_number":666,"context_line":"                    ret \u003d self.create_security_group("},{"line_number":667,"context_line":"                        context, security_group, default_sg\u003dTrue)"},{"line_number":668,"context_line":"                except exception.DBDuplicateEntry as ex:"},{"line_number":669,"context_line":"                    LOG.debug(\"Duplicate default security group %s was \""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_072047af","line":666,"in_reply_to":"3a50d1a3_fc189020","updated":"2015-08-01 17:50:32.000000000","message":"At line 154, its starts a *nested* transaction (if needed), once the security-group created successfully it gets to a savepoint.\nIf line 162 raises DBDuplicateError then it will bubble up to line 668, which excepts that error, as it should, right?","commit_id":"e44c149a2ac6ad7eb7a639cc6b361ed696d4340c"}]}
