)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b878e16a600d007e764460bc82bc1abd96f23214","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Query availability zone in a single query"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For better performace, replace to a single query to reterive"},{"line_number":10,"context_line":"instance availability zone not multiple query execution."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I4c10fcb43de124259990aa0caec466d62424a0be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da6895a0_830666cc","line":9,"updated":"2016-10-26 09:06:30.000000000","message":"s/reterive/retrieve/\ns/performace/performance/\ns/replace to a single query to .../replace multiple queries with a single DB query to retrieve an instance\u0027s availability zone/","commit_id":"76b04f3dbd904e7a58ab29bae74e42a15467810f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b80207b2c1d409ac82adc48ec2092724e6770ac6","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For better performance, replace multiple queries with a single DB query"},{"line_number":10,"context_line":"to retrieve an instance\u0027s availability zone."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I4c10fcb43de124259990aa0caec466d62424a0be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba5da102_ca7d25b3","line":11,"updated":"2016-11-04 14:16:34.000000000","message":"Do you have a bug report with details on the performance increase? Or just something that you can share in the review if not in the commit message?","commit_id":"1d159fdb5e0f0dd874149ffd02fc0ce204f9425f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c981a0a829b55120986088e6dde912703bb7b4a1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For better performance, replace multiple queries with a single DB query"},{"line_number":10,"context_line":"to retrieve an instance\u0027s availability zone."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I4c10fcb43de124259990aa0caec466d62424a0be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a629dbe_f608192b","line":11,"in_reply_to":"9a629dbe_b7d4e847","updated":"2016-11-07 12:08:41.000000000","message":"FWIW, I had that very opiniated change in mind https://review.openstack.org/#/c/221384/\n\nNo time to further dig on the performance impact, but I think the whole AZ cache is somehow bonkers.","commit_id":"1d159fdb5e0f0dd874149ffd02fc0ce204f9425f"},{"author":{"_account_id":5003,"name":"Choe, Cheng-Dae","email":"whitekid@gmail.com","username":"whitekid"},"change_message_id":"7f43c93c701cef7893bb0f9cce6b98fc0dd66185","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For better performance, replace multiple queries with a single DB query"},{"line_number":10,"context_line":"to retrieve an instance\u0027s availability zone."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I4c10fcb43de124259990aa0caec466d62424a0be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a629dbe_b7d4e847","line":11,"in_reply_to":"ba5da102_ca7d25b3","updated":"2016-11-07 09:17:08.000000000","message":"@matt In our test environment has 89 instance, ExtendedAZController.detail() gets below execution time without cache. theses are average of 100 times calls.\n\nOriginal code: 0.897194 sec\nPatched code: 0.0817464 sec","commit_id":"1d159fdb5e0f0dd874149ffd02fc0ce204f9425f"}],"nova/availability_zones.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b878e16a600d007e764460bc82bc1abd96f23214","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            azs.append(az)"},{"line_number":108,"context_line":"        return azs"},{"line_number":109,"context_line":"    else:"},{"line_number":110,"context_line":"        return [CONF.default_availability_zone] * len(hosts)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def update_host_availability_zone_cache(context, host, availability_zone\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da6895a0_83890629","line":110,"updated":"2016-10-26 09:06:30.000000000","message":"Please break the above code into a separate patch. It is unrelated to the code that grabs availability zone for instances.","commit_id":"76b04f3dbd904e7a58ab29bae74e42a15467810f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"57fd300abf15a0f03832946a8ff7d2d856e30b19","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            az \u003d None"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        if az:"},{"line_number":211,"context_line":"            azs[i] \u003d az"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            hosts_to_fetch.append(i)"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_fdd46d48","line":211,"updated":"2016-11-07 15:30:43.000000000","message":"so you\u0027re creating an in-memory object that would cache the AZ keyed by the tuple (host, instance) right?\n\nIf so, don\u0027t you feel you need that because the AZ cache helper is bonkers ? That looks like an optimization based on the fault analysis that the cache is helpful, but given your problem is that we call a lot of times the object method for getting the aggregate, that means the cache invalidation is happening often, right?\n\nTbh, I\u0027d be by far in favor of removing the whole existing AZ cache and find a better solution with an in-memory hash object like you wrote.\n\nFind all my concerns about why I think the AZ cache is nuts in https://review.openstack.org/#/c/221384/6//COMMIT_MSG","commit_id":"89c84783decf0c6f7dde76e6d1afff7d516914bb"},{"author":{"_account_id":5003,"name":"Choe, Cheng-Dae","email":"whitekid@gmail.com","username":"whitekid"},"change_message_id":"cefb4c16e8f77c7f9fe0b228a187b24df0d09b4e","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            az \u003d None"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        if az:"},{"line_number":211,"context_line":"            azs[i] \u003d az"},{"line_number":212,"context_line":"        else:"},{"line_number":213,"context_line":"            hosts_to_fetch.append(i)"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_c89fe45d","line":211,"in_reply_to":"9a629dbe_fdd46d48","updated":"2016-11-07 17:26:19.000000000","message":"I have no proference cache usage in this patch. cache has pros and cons. but if we drop the cache usage then this patch may be very simple and stragitforward and more readable.\n\nDo you want to remove cache support in this patch?","commit_id":"89c84783decf0c6f7dde76e6d1afff7d516914bb"}],"nova/objects/aggregate.py":[{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"c68228ac9f745e5ba3de6a965efa3c21bef2c99f","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        api_db_aggregates \u003d [cls._fill_deprecated(agg) for agg in"},{"line_number":563,"context_line":"                             _get_by_hosts_from_db(context, hosts, key\u003dkey)]"},{"line_number":564,"context_line":"        aggregates \u003d [db.aggregate_get_by_host(context, host, key\u003dkey)"},{"line_number":565,"context_line":"                      for host in hosts]"},{"line_number":566,"context_line":"        db_aggregates \u003d list(chain.from_iterable(aggregates))"},{"line_number":567,"context_line":"        return base.obj_make_list(context, cls(context), objects.Aggregate,"},{"line_number":568,"context_line":"                                  db_aggregates + api_db_aggregates)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a629dbe_f9ba5c22","line":565,"updated":"2016-11-09 13:35:59.000000000","message":"This still makes one db call per host, so no gain compared to previously. Why not use the existing method get_by_metadata_key() below instead, which is almost identical to this new method and in fact issues just a single db call (ok, two since we currently need to query two databases)?","commit_id":"f9019c44f8458ffb8337c0bb67b75ad72ef33e02"}]}
