)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11650,"name":"Tom Cammann","email":"tom.cammann@hpe.com","username":"cammann"},"change_message_id":"b2edc5b7c1b9e5d3335adb8a98c1e328ce6284b2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hua Wang \u003cwanghua.humble@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-03 04:26:40 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make periodic tasks can run simultaneously"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to run several magnum-conductor, we should make periodic"},{"line_number":10,"context_line":"tasks can run simultaneously. We should not destroy a bay twice."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_fd4decc4","line":7,"updated":"2015-08-10 11:19:09.000000000","message":"This commit line is misleading in what has actually been fixed. I would suggest something closer to: \"Fix race condition when syncing bay status across conductors\".","commit_id":"1d829829a84692ae8ffee83a2cc48ad9797030e5"}],"magnum/service/periodic.py":[{"author":{"_account_id":7049,"name":"Kai Qiang Wu(Kennan)","email":"wkq5325@gmail.com","username":"Kennan"},"change_message_id":"500fcc7e6f3f6f2f42b24a359288d5eb0820314a","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                    try:"},{"line_number":87,"context_line":"                        bay.destroy()"},{"line_number":88,"context_line":"                    except exception.BayNotFound:"},{"line_number":89,"context_line":"                        LOG.info(_LI(\u0027The bay %s has been deleted by others.\u0027)"},{"line_number":90,"context_line":"                                 % bay.uuid)"},{"line_number":91,"context_line":"                    LOG.info(_LI(\"Bay with id %(id)s has been deleted due \""},{"line_number":92,"context_line":"                                 \"to stack with id %(sid)s not found in \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_18b9a2cb","line":89,"updated":"2015-08-11 01:33:56.000000000","message":"I did not understand how can it fix race conditions. it just catch the previous non-catched exception.\n\nAnd I did not find unit related with it for fix the issue.","commit_id":"e495f81b3974e92a52c41ec9f0706075e8bd9cc9"},{"author":{"_account_id":11650,"name":"Tom Cammann","email":"tom.cammann@hpe.com","username":"cammann"},"change_message_id":"4b6c8f8946e5ea2cafdceb592403413b8053a702","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                    try:"},{"line_number":87,"context_line":"                        bay.destroy()"},{"line_number":88,"context_line":"                    except exception.BayNotFound:"},{"line_number":89,"context_line":"                        LOG.info(_LI(\u0027The bay %s has been deleted by others.\u0027)"},{"line_number":90,"context_line":"                                 % bay.uuid)"},{"line_number":91,"context_line":"                    LOG.info(_LI(\"Bay with id %(id)s has been deleted due \""},{"line_number":92,"context_line":"                                 \"to stack with id %(sid)s not found in \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_ef8bbb66","line":89,"in_reply_to":"1a4dcd0f_18b9a2cb","updated":"2015-08-11 10:09:24.000000000","message":"If another node is syncing the statuses it could run bay.destroy() before another node. The nodes that try and sync this bay after could throw an exception as the bay no longer exists in the db. Hence the race condition if 2 nodes run this code path simultaneously.\n\nWriting tests for this type of cases is notoriously difficult, so I am not too bothered by missing one here.","commit_id":"e495f81b3974e92a52c41ec9f0706075e8bd9cc9"},{"author":{"_account_id":7049,"name":"Kai Qiang Wu(Kennan)","email":"wkq5325@gmail.com","username":"Kennan"},"change_message_id":"2e3633c95ebf466c942ea733e3d5bbd81a6a6fa9","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                    try:"},{"line_number":87,"context_line":"                        bay.destroy()"},{"line_number":88,"context_line":"                    except exception.BayNotFound:"},{"line_number":89,"context_line":"                        LOG.info(_LI(\u0027The bay %s has been deleted by others.\u0027)"},{"line_number":90,"context_line":"                                 % bay.uuid)"},{"line_number":91,"context_line":"                    LOG.info(_LI(\"Bay with id %(id)s has been deleted due \""},{"line_number":92,"context_line":"                                 \"to stack with id %(sid)s not found in \""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_ca41a9aa","line":89,"in_reply_to":"1a4dcd0f_ef8bbb66","updated":"2015-08-13 00:11:11.000000000","message":"Thanks @Tom, my intial question about this, if tg can start that peridic task, does it stop it when got exception ?\n\nCould that tg start next task again on next period even got exception in last time? If yes, it seems still can work.\n\nAnyway, it is good catch for exception issue.","commit_id":"e495f81b3974e92a52c41ec9f0706075e8bd9cc9"}]}
