)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"843023fcf19807716ec82d0d25da914dd3cd3d12","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We are hitting deadlocks in the gate when we are inserting the new"},{"line_number":10,"context_line":"instance_extra row into the DB."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"We should follow up this fix and look at way to avoid the deadlock"},{"line_number":13,"context_line":"happening rather than retrying it. It currently doesn\u0027t happen too"},{"line_number":14,"context_line":"often, so this should be enough to stop the problem while we work on a"},{"line_number":15,"context_line":"better fix."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1af94dfe_5041fa38","line":12,"updated":"2016-03-15 13:18:54.000000000","message":"I see this used extensively in the api layer, I wonder if this is one of those instances where we can\u0027t really live without the retry attempt.","commit_id":"e3efc34b6db69484f5da2093831b7335a0db4390"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"843023fcf19807716ec82d0d25da914dd3cd3d12","unresolved":false,"context_lines":[{"line_number":1843,"context_line":""},{"line_number":1844,"context_line":""},{"line_number":1845,"context_line":"@require_context"},{"line_number":1846,"context_line":"@oslo_db_api.wrap_db_retry(max_retries\u003d5, retry_on_deadlock\u003dTrue)"},{"line_number":1847,"context_line":"@pick_context_manager_writer"},{"line_number":1848,"context_line":"def instance_create(context, values):"},{"line_number":1849,"context_line":"    \"\"\"Create a new Instance record in the database."}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_f0f766f3","line":1846,"updated":"2016-03-15 13:18:54.000000000","message":"not much of an expert here but while scanning this file I noticed that there\u0027s a retry on destroy too, so this looks good to me.","commit_id":"e3efc34b6db69484f5da2093831b7335a0db4390"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"724d962523e6f2f806c810c5ac41a7af2092022e","unresolved":false,"context_lines":[{"line_number":1843,"context_line":""},{"line_number":1844,"context_line":""},{"line_number":1845,"context_line":"@require_context"},{"line_number":1846,"context_line":"@oslo_db_api.wrap_db_retry(max_retries\u003d5, retry_on_deadlock\u003dTrue)"},{"line_number":1847,"context_line":"@pick_context_manager_writer"},{"line_number":1848,"context_line":"def instance_create(context, values):"},{"line_number":1849,"context_line":"    \"\"\"Create a new Instance record in the database."}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_35169b55","line":1846,"in_reply_to":"1af94dfe_f0f766f3","updated":"2016-03-16 14:30:26.000000000","message":"I\u0027m trying to figure out all the problems with retrying an DB insert but even with cells v2 world, it doesn\u0027t seem hartful to me.","commit_id":"e3efc34b6db69484f5da2093831b7335a0db4390"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f32588703f0ae9c2f1f8b611b2fb1884e5930a7c","unresolved":false,"context_lines":[{"line_number":1870,"context_line":"    if info_cache is not None:"},{"line_number":1871,"context_line":"        instance_ref[\u0027info_cache\u0027].update(info_cache)"},{"line_number":1872,"context_line":"    security_groups \u003d values.pop(\u0027security_groups\u0027, [])"},{"line_number":1873,"context_line":"    instance_ref[\u0027extra\u0027] \u003d models.InstanceExtra()"},{"line_number":1874,"context_line":"    instance_ref[\u0027extra\u0027].update("},{"line_number":1875,"context_line":"        {\u0027numa_topology\u0027: None,"},{"line_number":1876,"context_line":"         \u0027pci_requests\u0027: None,"},{"line_number":1877,"context_line":"         \u0027vcpu_model\u0027: None,"},{"line_number":1878,"context_line":"         })"},{"line_number":1879,"context_line":"    instance_ref[\u0027extra\u0027].update(values.pop(\u0027extra\u0027, {}))"},{"line_number":1880,"context_line":"    instance_ref.update(values)"},{"line_number":1881,"context_line":""},{"line_number":1882,"context_line":"    def _get_sec_group_models(security_groups):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_a1a42da6","line":1879,"range":{"start_line":1873,"start_character":4,"end_line":1879,"end_character":57},"updated":"2016-03-16 15:18:23.000000000","message":"Do we need to insert this at the same time as the instance record? Couldn\u0027t we create the instance record first and then insert the instance_extra record using the instance_ref[\u0027uuid\u0027] that we have?\n\nSame for InstanceIdMapping for the ec2 stuff. We are doing this one big atomic insert, but do we really need to? We just need the instance uuid for the foreign key ref back to other table records that we could be inserting later, and if we fail to insert the instance record, then we don\u0027t even need to worry about the others since they don\u0027t matter w/o the foreign key ref.","commit_id":"e3efc34b6db69484f5da2093831b7335a0db4390"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"b31410ceb0e7adc10f3df80b98472ce35a8790a1","unresolved":false,"context_lines":[{"line_number":1870,"context_line":"    if info_cache is not None:"},{"line_number":1871,"context_line":"        instance_ref[\u0027info_cache\u0027].update(info_cache)"},{"line_number":1872,"context_line":"    security_groups \u003d values.pop(\u0027security_groups\u0027, [])"},{"line_number":1873,"context_line":"    instance_ref[\u0027extra\u0027] \u003d models.InstanceExtra()"},{"line_number":1874,"context_line":"    instance_ref[\u0027extra\u0027].update("},{"line_number":1875,"context_line":"        {\u0027numa_topology\u0027: None,"},{"line_number":1876,"context_line":"         \u0027pci_requests\u0027: None,"},{"line_number":1877,"context_line":"         \u0027vcpu_model\u0027: None,"},{"line_number":1878,"context_line":"         })"},{"line_number":1879,"context_line":"    instance_ref[\u0027extra\u0027].update(values.pop(\u0027extra\u0027, {}))"},{"line_number":1880,"context_line":"    instance_ref.update(values)"},{"line_number":1881,"context_line":""},{"line_number":1882,"context_line":"    def _get_sec_group_models(security_groups):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_8af701d2","line":1879,"range":{"start_line":1873,"start_character":4,"end_line":1879,"end_character":57},"in_reply_to":"1af94dfe_a1a42da6","updated":"2016-03-18 18:18:21.000000000","message":"we\u0027re very often failing on the extra insert. I do wonder if getting rid of the transactions is going to make this go away or not.\n\nThis would be one of those times where it would be really nice if performance team had a scenario to generate enough load to figure this out.","commit_id":"e3efc34b6db69484f5da2093831b7335a0db4390"}]}
