)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4cfae30233e0993b34149e9b6bd478966dab2322","unresolved":false,"context_lines":[{"line_number":10,"context_line":"actions maybe have same instance_uuid and request_id. When"},{"line_number":11,"context_line":"we record the event we should get the last created action,"},{"line_number":12,"context_line":"otherwise, we would find the wrong action, and we can\u0027t find"},{"line_number":13,"context_line":"the specific event using this wrong action id. Finally, raise"},{"line_number":14,"context_line":"a 500 error due to the error of InstanceActionEventNotFound."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"So, if more than one actions with same instance uuid and request"},{"line_number":17,"context_line":"id are exists. we should choice the last created action id as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3fa0c359_1b04bb7a","line":14,"range":{"start_line":13,"start_character":56,"end_line":14,"end_character":5},"updated":"2018-02-07 21:47:34.000000000","message":"a 500 error is raised?","commit_id":"b933847cbbf03ffb0ea6762ae60bca9ad92bc1e3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4cfae30233e0993b34149e9b6bd478966dab2322","unresolved":false,"context_lines":[{"line_number":13,"context_line":"the specific event using this wrong action id. Finally, raise"},{"line_number":14,"context_line":"a 500 error due to the error of InstanceActionEventNotFound."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"So, if more than one actions with same instance uuid and request"},{"line_number":17,"context_line":"id are exists. we should choice the last created action id as"},{"line_number":18,"context_line":"event record action id."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3fa0c359_bbfa6772","line":16,"range":{"start_line":16,"start_character":21,"end_line":16,"end_character":28},"updated":"2018-02-07 21:47:34.000000000","message":"action","commit_id":"b933847cbbf03ffb0ea6762ae60bca9ad92bc1e3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4cfae30233e0993b34149e9b6bd478966dab2322","unresolved":false,"context_lines":[{"line_number":14,"context_line":"a 500 error due to the error of InstanceActionEventNotFound."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"So, if more than one actions with same instance uuid and request"},{"line_number":17,"context_line":"id are exists. we should choice the last created action id as"},{"line_number":18,"context_line":"event record action id."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This change fixes this by sorting action by desc(created_at, id)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3fa0c359_9bef6baf","line":17,"range":{"start_line":17,"start_character":25,"end_line":17,"end_character":31},"updated":"2018-02-07 21:47:34.000000000","message":"choose","commit_id":"b933847cbbf03ffb0ea6762ae60bca9ad92bc1e3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4cfae30233e0993b34149e9b6bd478966dab2322","unresolved":false,"context_lines":[{"line_number":14,"context_line":"a 500 error due to the error of InstanceActionEventNotFound."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"So, if more than one actions with same instance uuid and request"},{"line_number":17,"context_line":"id are exists. we should choice the last created action id as"},{"line_number":18,"context_line":"event record action id."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This change fixes this by sorting action by desc(created_at, id)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3fa0c359_7bf4df86","line":17,"range":{"start_line":17,"start_character":3,"end_line":17,"end_character":13},"updated":"2018-02-07 21:47:34.000000000","message":"exist","commit_id":"b933847cbbf03ffb0ea6762ae60bca9ad92bc1e3"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6676e8d289b3e7bddd1db1810d2c9ffbb1c62d85","unresolved":false,"context_lines":[{"line_number":5805,"context_line":"    result \u003d model_query(context, models.InstanceAction).\\"},{"line_number":5806,"context_line":"                         filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":5807,"context_line":"                         filter_by(request_id\u003drequest_id).\\"},{"line_number":5808,"context_line":"                         order_by(desc(\"created_at\"), desc(\"id\")).\\"},{"line_number":5809,"context_line":"                         first()"},{"line_number":5810,"context_line":"    return result"},{"line_number":5811,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa0c359_3350ac32","line":5808,"updated":"2018-02-08 13:40:36.000000000","message":"Since we filter by the instance first, and then by the request ID, the SQL execution plan for ordering by timestamps should be quick, hence not a performance issue. LGTM.","commit_id":"b933847cbbf03ffb0ea6762ae60bca9ad92bc1e3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"4f3db25c48cf5da20c186a6444c3c557f43b6d09","unresolved":false,"context_lines":[{"line_number":5805,"context_line":"    result \u003d model_query(context, models.InstanceAction).\\"},{"line_number":5806,"context_line":"                         filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":5807,"context_line":"                         filter_by(request_id\u003drequest_id).\\"},{"line_number":5808,"context_line":"                         order_by(desc(\"created_at\"), desc(\"id\")).\\"},{"line_number":5809,"context_line":"                         first()"},{"line_number":5810,"context_line":"    return result"},{"line_number":5811,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa0c359_9e0e6730","line":5808,"in_reply_to":"3fa0c359_3350ac32","updated":"2018-02-08 13:43:08.000000000","message":"Hah, the top patch is actually adding an index on those timestamps...","commit_id":"b933847cbbf03ffb0ea6762ae60bca9ad92bc1e3"}]}
