)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0d549d7bc9170f1b7e8ed33f67b1613dbab2786e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"(*) I think there might be a bug in this pagination method, but it\u0027s not"},{"line_number":46,"context_line":"introduced by this patch. If you were sorting on name and you\u0027ve got 100"},{"line_number":47,"context_line":"instances all called \u0027foo\u0027, if we resume at (name \u003e \u0027foo\u0027) we\u0027ll lose a"},{"line_number":48,"context_line":"whole page full of foo."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Change-Id: I6da01c566924f9209c4d8673027c4a44f9e1271b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ff0f0b1f_4df8e747","line":48,"updated":"2017-05-22 23:22:00.000000000","message":"This is incorrect. The marker is always the instance UUID.\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L2271-L2272","commit_id":"11b0f5a0f9a746bd92ce2a347e3014c006793fa2"}],"nova/compute/api.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"7af881a1cc7d08b55828561118841f5eb5b2afc4","unresolved":false,"context_lines":[{"line_number":2680,"context_line":"                return self"},{"line_number":2681,"context_line":""},{"line_number":2682,"context_line":"            def next(self):"},{"line_number":2683,"context_line":"                db_instance \u003d self.query.next()"},{"line_number":2684,"context_line":""},{"line_number":2685,"context_line":"                uuid \u003d db_instance[\u0027uuid\u0027]"},{"line_number":2686,"context_line":"                instance_context_map[uuid] \u003d self.context"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f013ff3_21a30a52","line":2683,"updated":"2017-05-12 16:18:23.000000000","message":"right so this is fine, like we discussed, what this does is:\n\n1. first time you call next(), it emits SQL, e.g. \"SELECT ....\", then calls fetchall() on the pymysql cursor, then loads all rows in that result into a list of Python objects, then iterator yields the first object.\n\n2. next time you call next(), you get the next object in that existing iterator.\n\nSo this is like a \"pre buffer up front\" approach.  If you have lots of cells, you will have all these requests stacked in serial one after the next.\n\nI think even if the thing didn\u0027t buffer anything, and really did one row at a time and yielded it out, that doesn\u0027t make much difference, without any parallelization of the IO you are taking the same amount of time anyway.   Doing the chunk of objects in a batch is definitely simpler Python-wise.   We assume here \"limit\" is something small like 50 or 100. if \"limit\" could be huge (unlikely?) then you\u0027d want to use query.yield_per() to limit the size of the chunks.","commit_id":"11b0f5a0f9a746bd92ce2a347e3014c006793fa2"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"7af881a1cc7d08b55828561118841f5eb5b2afc4","unresolved":false,"context_lines":[{"line_number":2702,"context_line":"            with nova_context.target_cell(context, cell) as ccontext:"},{"line_number":2703,"context_line":"                cell_iters.append(CellInstanceIterator(ccontext))"},{"line_number":2704,"context_line":""},{"line_number":2705,"context_line":"        instances_merged \u003d heapq.merge(**cell_iters)"},{"line_number":2706,"context_line":"        instances \u003d []"},{"line_number":2707,"context_line":"        for instance in instances_merged:"},{"line_number":2708,"context_line":"            instances.append(instance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f013ff3_a1e03a98","line":2705,"updated":"2017-05-12 16:18:23.000000000","message":"i love heapq!","commit_id":"11b0f5a0f9a746bd92ce2a347e3014c006793fa2"}]}
