)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"da4324c0d76b78d8b5c335a81cc876a611884864","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"1. http://docs.sqlalchemy.org/en/latest/orm/versioning.html"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Partially-Implements: bp/push-notifications"},{"line_number":32,"context_line":"Change-Id: Ia2d911a6a90b1baba1d5cc36f7c625e156a2bc33"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7aa08908_05a152f8","line":31,"range":{"start_line":31,"start_character":22,"end_line":31,"end_character":43},"updated":"2016-06-14 02:02:35.000000000","message":"nit: \"blueprint push-notifications\", otherwise link does not work :(","commit_id":"56fd9984e880a7b246332cde99b5305704436dbf"}],"neutron/db/model_base.py":[{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"14a1e73a70fc8a328a5f9b0e780101e7abd5b36d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # standard attr record is being modified, but we must call this"},{"line_number":177,"context_line":"        # for all other modifications or when relevant children are being"},{"line_number":178,"context_line":"        # modified (e.g. fixed_ips change should bump port revision)"},{"line_number":179,"context_line":"        self.standard_attr.revision_number +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_d7df6838","line":179,"range":{"start_line":179,"start_character":8,"end_line":179,"end_character":47},"updated":"2016-06-10 14:17:38.000000000","message":"Don\u0027t we need a locked increment here? Like someone updates a top level object directly, and concurrently a triggered bump comes from an update of a related object.\n\nI may be sounding naive, but just for my understanding!","commit_id":"8fe7579927f2512dd847d1d41e23c778f29f314d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"351ecdbb9eac591ed2958190d7053d979465778d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # standard attr record is being modified, but we must call this"},{"line_number":177,"context_line":"        # for all other modifications or when relevant children are being"},{"line_number":178,"context_line":"        # modified (e.g. fixed_ips change should bump port revision)"},{"line_number":179,"context_line":"        self.standard_attr.revision_number +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_0a4a4cac","line":179,"updated":"2016-06-10 23:43:44.000000000","message":"It\u0027s fine if both bump the revision. It still results in a compare and swap update. The revision number will just be two higher.","commit_id":"8fe7579927f2512dd847d1d41e23c778f29f314d"},{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"720f334d212b29199cb7b47726992cf4d792a892","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # standard attr record is being modified, but we must call this"},{"line_number":177,"context_line":"        # for all other modifications or when relevant children are being"},{"line_number":178,"context_line":"        # modified (e.g. fixed_ips change should bump port revision)"},{"line_number":179,"context_line":"        self.standard_attr.revision_number +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_7738cdd3","line":179,"in_reply_to":"7aa08908_0a4a4cac","updated":"2016-06-14 01:54:54.000000000","message":"I think it would not be \u0027two higher\u0027, but one would fail instead as it has \u0027stale\u0027 data:\n\nIn case of 2 concurrent sessions (i.e. both \u0027start transaction\u0027 at the same time), one would be locked by the other\u0027s \u0027update\u0027 (either the object or the version bump) until the other commits and then it would fail due to \u0027no-rows-updated\u0027 exception on version bump. In case of Galera cluster that would lead to a deadlock exception instead (due to the conflict).","commit_id":"8fe7579927f2512dd847d1d41e23c778f29f314d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b9094f61ac5d474babafd64890d13d217711ab98","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # standard attr record is being modified, but we must call this"},{"line_number":177,"context_line":"        # for all other modifications or when relevant children are being"},{"line_number":178,"context_line":"        # modified (e.g. fixed_ips change should bump port revision)"},{"line_number":179,"context_line":"        self.standard_attr.revision_number +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_ab5c8c19","line":179,"in_reply_to":"7aa08908_7738cdd3","updated":"2016-06-14 04:15:50.000000000","message":"it depends on what Skreekumar is asking. If it\u0027s two things within the same transaction that bump the revision, it will increment by 2.\n\nIf it\u0027s two separate transactions, one will fail with staledataerror or deadlock and trigger a retry, which is exactly what we want.\n\nThis is because the increment is issued as a compare and swap operation so it will only increment if something else hasn\u0027t changed the revision number before it.","commit_id":"8fe7579927f2512dd847d1d41e23c778f29f314d"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":19554,"name":"Nam","email":"namnh68@fsoft.com.vn","username":"namnh"},"change_message_id":"327abab52c2ffa58f72f210d211208efa2fb0f77","unresolved":false,"context_lines":[{"line_number":6113,"context_line":"        self._test_staledata_error_on_concurrent_object_update("},{"line_number":6114,"context_line":"            models_v2.SubnetPool, subnetpool[\u0027id\u0027])"},{"line_number":6115,"context_line":""},{"line_number":6116,"context_line":"    def test_staledata_error_on_concurrent_object_update_router(self):"},{"line_number":6117,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":6118,"context_line":"        router \u003d self._make_router(ctx)"},{"line_number":6119,"context_line":"        self._test_staledata_error_on_concurrent_object_update("}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_35100e59","line":6116,"range":{"start_line":6116,"start_character":8,"end_line":6116,"end_character":63},"updated":"2016-06-24 06:52:49.000000000","message":"Hi Mr.Kevin.\n\nThanks for your effert. I would like to report a proble to you, could you check it.\n\nI hope that this patch set can fix this bug [1]. But when I reproduce then it can occur, and there is a new problem, I think it\u0027s related to this patch set and patch [2]\nMy bug is that created multiple gateway-port to *one* router by running two commands \"neutron router-gateway-get\" at the same time.\nLet me explain how to reproduce:\n\nImage that: we have a external network (called: public)\n\nStep 1: Create router:\n\n# neutron router-create router-test\n\nStep2: Using API-worked:\n\n# neutron router-gateway-set router-test public \u0026 neutron router-gateway-set router-test public\n\nHere is result: http://paste.openstack.org/show/521846/\n\nAnd logs: http://paste.openstack.org/show/521852/\n\nHow do you think about this case. I\n\n[1] https://bugs.launchpad.net/neutron/+bug/1535225\n[2] https://review.openstack.org/#/c/326926/","commit_id":"56fd9984e880a7b246332cde99b5305704436dbf"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"b8ba06a4a444abb984db405dbd7d8062bd3f5c44","unresolved":false,"context_lines":[{"line_number":6113,"context_line":"        self._test_staledata_error_on_concurrent_object_update("},{"line_number":6114,"context_line":"            models_v2.SubnetPool, subnetpool[\u0027id\u0027])"},{"line_number":6115,"context_line":""},{"line_number":6116,"context_line":"    def test_staledata_error_on_concurrent_object_update_router(self):"},{"line_number":6117,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":6118,"context_line":"        router \u003d self._make_router(ctx)"},{"line_number":6119,"context_line":"        self._test_staledata_error_on_concurrent_object_update("}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_d15790c8","line":6116,"range":{"start_line":6116,"start_character":8,"end_line":6116,"end_character":63},"in_reply_to":"3aaa91ec_35100e59","updated":"2016-06-28 08:24:11.000000000","message":"Did you mean to say, None of the gateway-set\u0027s worked?\nThe issue mentioned in bug #1535225 is that all of the concurrent calls went through when in active-active, and in devstack all-in-one setup with more api-workers, and that you were not able to delete the ports.\n\nIf I understood correctly, here the issue you are seeing is that none of the gateway-set\u0027s are going through. Both of them failed with StaleDataError:!!! If this understanding is correct then it might be a new concurrency issue most probably within SQLAlchemy.\n\nIdeally, even with Kevin\u0027s patch, both the calls should have gone through and the bug #1535225 should have remained, because when the API retries with a new revision it will create a new port because there is no validation in place? Am I right? Or is there a validation in place in this path. I know of another bug #1430345 which is caused by lack of validation. PS #2 https://review.openstack.org/#/c/274021/2 for this issue was rejected because of concurrency concerns. Now with Kevin\u0027s patches (this one and patch [2]) the API call paths will be serialized, and such a validation should ideally work. @Kevin, what do you think?","commit_id":"56fd9984e880a7b246332cde99b5305704436dbf"}]}
