)]}'
{"nova/compute/instance_list.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"38f7733a32cd999c0f5bcea1d6c48101942f35fb","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    \"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    try:"},{"line_number":62,"context_line":"        im \u003d objects.InstanceMapping.get_by_instance_uuid(ctx, marker)"},{"line_number":63,"context_line":"    except exception.InstanceMappingNotFound:"},{"line_number":64,"context_line":"        raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_391e97ba","line":62,"updated":"2017-09-20 21:03:31.000000000","message":"This should read deleted","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3ca1264e8ba2609fc61f0b88e7bb451931d70c0d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    \"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    try:"},{"line_number":62,"context_line":"        im \u003d objects.InstanceMapping.get_by_instance_uuid(ctx, marker)"},{"line_number":63,"context_line":"    except exception.InstanceMappingNotFound:"},{"line_number":64,"context_line":"        raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_f97d9fe7","line":62,"in_reply_to":"bf57530f_391e97ba","updated":"2017-09-20 21:03:56.000000000","message":"Nevermind","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a6b0d90bc2e869e969ce5096ec718f16bb66efed","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    \"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    try:"},{"line_number":62,"context_line":"        im \u003d objects.InstanceMapping.get_by_instance_uuid(ctx, marker)"},{"line_number":63,"context_line":"    except exception.InstanceMappingNotFound:"},{"line_number":64,"context_line":"        raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_4bd97281","line":62,"in_reply_to":"bf57530f_f97d9fe7","updated":"2017-09-20 21:24:51.000000000","message":"I guess this means we can never remove instance mappings, unless the (soft) deleted instance is purged or moved to shadow tables.","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3c3223e99e000065177852168da3898f2e5b770","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    except exception.InstanceMappingNotFound:"},{"line_number":64,"context_line":"        raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    elevated \u003d ctx.elevated(read_deleted\u003d\u0027yes\u0027)"},{"line_number":67,"context_line":"    with context.target_cell(elevated, im.cell_mapping) as cctx:"},{"line_number":68,"context_line":"        db_inst \u003d db.instance_get_by_uuid(cctx, marker)"},{"line_number":69,"context_line":"    return db_inst"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_592eeba5","line":66,"range":{"start_line":66,"start_character":28,"end_line":66,"end_character":46},"updated":"2017-09-20 21:22:33.000000000","message":"OK this is what we do in the DB API today:\n\nhttps://github.com/openstack/nova/blob/ddac72f9c57513ec39d54b80ddfec3162a821ee0/nova/db/sqlalchemy/api.py#L2263","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a6b0d90bc2e869e969ce5096ec718f16bb66efed","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    elevated \u003d ctx.elevated(read_deleted\u003d\u0027yes\u0027)"},{"line_number":67,"context_line":"    with context.target_cell(elevated, im.cell_mapping) as cctx:"},{"line_number":68,"context_line":"        db_inst \u003d db.instance_get_by_uuid(cctx, marker)"},{"line_number":69,"context_line":"    return db_inst"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_2bbf5efc","line":68,"range":{"start_line":68,"start_character":21,"end_line":68,"end_character":41},"updated":"2017-09-20 21:24:51.000000000","message":"Could we still get InstanceNotFound here even if we read deleted? Thinking if the db is purged/archived and the instance is moved to shadow tables.","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f12eb69cf3e0f8dfd34af0e042574deec188334c","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    elevated \u003d ctx.elevated(read_deleted\u003d\u0027yes\u0027)"},{"line_number":67,"context_line":"    with context.target_cell(elevated, im.cell_mapping) as cctx:"},{"line_number":68,"context_line":"        db_inst \u003d db.instance_get_by_uuid(cctx, marker)"},{"line_number":69,"context_line":"    return db_inst"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_b9604734","line":68,"updated":"2017-09-20 21:22:44.000000000","message":"We should ask for no attrs here.","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3c3223e99e000065177852168da3898f2e5b770","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    elevated \u003d ctx.elevated(read_deleted\u003d\u0027yes\u0027)"},{"line_number":67,"context_line":"    with context.target_cell(elevated, im.cell_mapping) as cctx:"},{"line_number":68,"context_line":"        db_inst \u003d db.instance_get_by_uuid(cctx, marker)"},{"line_number":69,"context_line":"    return db_inst"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_99558353","line":68,"range":{"start_line":68,"start_character":18,"end_line":68,"end_character":55},"updated":"2017-09-20 21:22:33.000000000","message":"columns_to_join\u003d[] to avoid any default joins that we don\u0027t care about?","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3c3223e99e000065177852168da3898f2e5b770","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        # instance in each cell (called the \u0027local\u0027 marker)."},{"line_number":99,"context_line":"        global_marker_instance \u003d _get_marker_instance(ctx, marker)"},{"line_number":100,"context_line":"        global_marker_values \u003d [global_marker_instance[key]"},{"line_number":101,"context_line":"                                for key in sort_keys]"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def do_query(ctx):"},{"line_number":104,"context_line":"        \"\"\"Return a list of InstanceWrapper(Instance) objects from a cell."}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_d9d09bcc","line":101,"range":{"start_line":101,"start_character":43,"end_line":101,"end_character":52},"updated":"2017-09-20 21:22:33.000000000","message":"assuming this isn\u0027t none?","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"19d485d7394bc8579a65216bf0a1e81accb0299e","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        # instance in each cell (called the \u0027local\u0027 marker)."},{"line_number":99,"context_line":"        global_marker_instance \u003d _get_marker_instance(ctx, marker)"},{"line_number":100,"context_line":"        global_marker_values \u003d [global_marker_instance[key]"},{"line_number":101,"context_line":"                                for key in sort_keys]"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def do_query(ctx):"},{"line_number":104,"context_line":"        \"\"\"Return a list of InstanceWrapper(Instance) objects from a cell."}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_6e944445","line":101,"range":{"start_line":101,"start_character":43,"end_line":101,"end_character":52},"in_reply_to":"bf57530f_d9d09bcc","updated":"2017-09-20 22:03:21.000000000","message":"Done","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3c3223e99e000065177852168da3898f2e5b770","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # that had the actual marker instance."},{"line_number":123,"context_line":"        local_marker_prefix \u003d []"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if marker:"},{"line_number":126,"context_line":"            # FIXME(danms): If we knew which cell we were in here, we could"},{"line_number":127,"context_line":"            # avoid looking up the marker again. But, we don\u0027t currently."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_397d77b1","line":125,"updated":"2017-09-20 21:22:33.000000000","message":"Thinking back on dbaf80d2c94db074a6651c890d532a11baec8da0, where do we ever null out the marker so that we can keep paging until we hit the limit? I guess it\u0027s not as simple here because today we iterate the cells until we find the marker, null it out and keep going. With this, we\u0027re querying the cells concurrently.","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"19d485d7394bc8579a65216bf0a1e81accb0299e","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # that had the actual marker instance."},{"line_number":123,"context_line":"        local_marker_prefix \u003d []"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if marker:"},{"line_number":126,"context_line":"            # FIXME(danms): If we knew which cell we were in here, we could"},{"line_number":127,"context_line":"            # avoid looking up the marker again. But, we don\u0027t currently."},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_8eaf7893","line":125,"in_reply_to":"bf57530f_397d77b1","updated":"2017-09-20 22:03:21.000000000","message":"Yep, and because we\u0027re not querying for the marker by uuid in the other cells.","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3c3223e99e000065177852168da3898f2e5b770","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                    # we do _not_ prefix the marker instance if our"},{"line_number":140,"context_line":"                    # marker was the global one since that has already"},{"line_number":141,"context_line":"                    # been sent to the user."},{"line_number":142,"context_line":"                    local_marker_filters \u003d copy.copy(filters)"},{"line_number":143,"context_line":"                    if \u0027uuid\u0027 not in local_marker_filters:"},{"line_number":144,"context_line":"                        # If a uuid filter was provided, it will"},{"line_number":145,"context_line":"                        # have included our marker already if this instance"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_6b69d6bc","line":142,"range":{"start_line":142,"start_character":43,"end_line":142,"end_character":61},"updated":"2017-09-20 21:22:33.000000000","message":"Does this need to be a deepcopy? Thinking about c4820305d2f9ee8d62bcc708baf3fa6dfe7ca960.","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"19d485d7394bc8579a65216bf0a1e81accb0299e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                    # we do _not_ prefix the marker instance if our"},{"line_number":140,"context_line":"                    # marker was the global one since that has already"},{"line_number":141,"context_line":"                    # been sent to the user."},{"line_number":142,"context_line":"                    local_marker_filters \u003d copy.copy(filters)"},{"line_number":143,"context_line":"                    if \u0027uuid\u0027 not in local_marker_filters:"},{"line_number":144,"context_line":"                        # If a uuid filter was provided, it will"},{"line_number":145,"context_line":"                        # have included our marker already if this instance"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf57530f_8ebad8db","line":142,"range":{"start_line":142,"start_character":43,"end_line":142,"end_character":61},"in_reply_to":"bf57530f_6b69d6bc","updated":"2017-09-20 22:03:21.000000000","message":"No, because I\u0027m just slapping a top-level key into it for the query right below this.","commit_id":"ec7b69338549e4b66287bde20b85352a3d86e3d0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e69f04afc2f5ba663cc2883ee8ea6b601e77d021","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            db_inst \u003d db.instance_get_by_uuid(cctx, marker,"},{"line_number":80,"context_line":"                                              columns_to_join\u003d[])"},{"line_number":81,"context_line":"        except exception.InstanceNotFound:"},{"line_number":82,"context_line":"            db_inst \u003d None"},{"line_number":83,"context_line":"    if not db_inst:"},{"line_number":84,"context_line":"        raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":85,"context_line":"    return db_inst"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"def get_instances_sorted(ctx, filters, limit, marker, columns_to_join,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f5c4f37_28cbf553","line":85,"range":{"start_line":81,"start_character":0,"end_line":85,"end_character":2},"updated":"2017-09-21 13:29:31.000000000","message":"I think we can simply raise MarkerNotFound from the except block. The instance_get_by_uuid either returns an instance or raises InstanceNotFound based on https://github.com/openstack/nova/blob/b926a1d4df86cbd48ba2b8b371454ccef96383c7/nova/db/sqlalchemy/api.py#L1919","commit_id":"decf09f1950d4f948a854f80fb832cdcc322e05c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"611fb77256934cede84e86ed666006df510a8865","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            db_inst \u003d db.instance_get_by_uuid(cctx, marker,"},{"line_number":80,"context_line":"                                              columns_to_join\u003d[])"},{"line_number":81,"context_line":"        except exception.InstanceNotFound:"},{"line_number":82,"context_line":"            db_inst \u003d None"},{"line_number":83,"context_line":"    if not db_inst:"},{"line_number":84,"context_line":"        raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":85,"context_line":"    return db_inst"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"def get_instances_sorted(ctx, filters, limit, marker, columns_to_join,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f5c4f37_769d4758","line":85,"range":{"start_line":81,"start_character":0,"end_line":85,"end_character":2},"in_reply_to":"9f5c4f37_0e9f1951","updated":"2017-09-21 15:57:41.000000000","message":"The MarkerNotFound exception is dropped here: https://github.com/openstack/nova/blob/693f26708a1c43bb67d4ca364016f8856cb7ce04/nova/tests/fixtures.py#L426 \n\nSo that fixture needs to be a bit smarter to allow testing the case when an exception is propagated from a target_cell context manager.\n\nIt seems that replacing\n\n    finally:\n        return\n\nwith \n\n    except:\n        raise\n    else:\n        return\n\ndoes the trick but I don\u0027t know what other test will fail with that change.","commit_id":"decf09f1950d4f948a854f80fb832cdcc322e05c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"127bdbd7042f16ad32d835613832a92ba7022e32","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            db_inst \u003d db.instance_get_by_uuid(cctx, marker,"},{"line_number":80,"context_line":"                                              columns_to_join\u003d[])"},{"line_number":81,"context_line":"        except exception.InstanceNotFound:"},{"line_number":82,"context_line":"            db_inst \u003d None"},{"line_number":83,"context_line":"    if not db_inst:"},{"line_number":84,"context_line":"        raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":85,"context_line":"    return db_inst"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"def get_instances_sorted(ctx, filters, limit, marker, columns_to_join,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f5c4f37_0e9f1951","line":85,"range":{"start_line":81,"start_character":0,"end_line":85,"end_character":2},"in_reply_to":"9f5c4f37_28cbf553","updated":"2017-09-21 13:37:07.000000000","message":"It\u0027s because of the target_cell handler. Move this into the except handler there and see what happens. I have a todo to work that out separately to figure out why it\u0027s not behaving properly.\n\n      File \"nova/compute/instance_list.py\", line 126, in get_instances_sorted\n        global_marker_instance \u003d _get_marker_instance(ctx, marker)\n      File \"nova/compute/instance_list.py\", line 84, in _get_marker_instance\n        return db_inst\n    UnboundLocalError: local variable \u0027db_inst\u0027 referenced before assignment\n\nFor some reason the raise from the get gets swallowed and we make it out to the return with an unbound variable. That\u0027s why I\u0027m doing it this way so I can work out why that is later.","commit_id":"decf09f1950d4f948a854f80fb832cdcc322e05c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0dd77a4571cd7a2f21dc3e7e33b473666fb1b04d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    with context.target_cell(elevated, im.cell_mapping) as cctx:"},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            db_inst \u003d db.instance_get_by_uuid(cctx, marker,"},{"line_number":80,"context_line":"                                              columns_to_join\u003d[])"},{"line_number":81,"context_line":"        except exception.InstanceNotFound:"},{"line_number":82,"context_line":"            db_inst \u003d None"},{"line_number":83,"context_line":"    if not db_inst:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_d0f2d19a","line":80,"range":{"start_line":80,"start_character":46,"end_line":80,"end_character":64},"updated":"2017-09-22 01:19:48.000000000","message":"nit: could leave a comment that we do this to avoid unnecessary joins, which by default are metadata and system_metadata down in the db api:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py#n1948\n\nAnd you can\u0027t filter/sort on those fields anyway, so it\u0027s safe to exclude them here.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0dd77a4571cd7a2f21dc3e7e33b473666fb1b04d","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        # record the values for the sort keys so we can find the marker"},{"line_number":125,"context_line":"        # instance in each cell (called the \u0027local\u0027 marker)."},{"line_number":126,"context_line":"        global_marker_instance \u003d _get_marker_instance(ctx, marker)"},{"line_number":127,"context_line":"        global_marker_values \u003d [global_marker_instance[key]"},{"line_number":128,"context_line":"                                for key in sort_keys]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def do_query(ctx):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_b01d15bf","line":127,"range":{"start_line":127,"start_character":8,"end_line":127,"end_character":28},"updated":"2017-09-22 01:19:48.000000000","message":"nit: rename to global_marker_sort_values? Could get confusing when we have filter values and sort values.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0dd77a4571cd7a2f21dc3e7e33b473666fb1b04d","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        # but after the marker instance which may have been in another cell."},{"line_number":144,"context_line":"        local_marker \u003d None"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        # Since the regular DB query routines take a marker and assume that"},{"line_number":147,"context_line":"        # the marked instance was the last entry of the previous page, we"},{"line_number":148,"context_line":"        # may need to prefix it to our result query if we\u0027re not the cell"},{"line_number":149,"context_line":"        # that had the actual marker instance."}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_505b8186","line":146,"range":{"start_line":146,"start_character":64,"end_line":146,"end_character":70},"updated":"2017-09-22 01:19:48.000000000","message":"assumes","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1acfe1ab307588e7d10a1f2aff4e1bf38aeea934","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        # but after the marker instance which may have been in another cell."},{"line_number":144,"context_line":"        local_marker \u003d None"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        # Since the regular DB query routines take a marker and assume that"},{"line_number":147,"context_line":"        # the marked instance was the last entry of the previous page, we"},{"line_number":148,"context_line":"        # may need to prefix it to our result query if we\u0027re not the cell"},{"line_number":149,"context_line":"        # that had the actual marker instance."}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_8375319b","line":146,"range":{"start_line":146,"start_character":64,"end_line":146,"end_character":70},"in_reply_to":"7f515b1d_505b8186","updated":"2017-09-22 01:32:05.000000000","message":"Why assumes? Assume seems right to me:\n\n Since the regular DB query routines [..] assume that the marked instance..","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1af4b61a61f947e6827e95a53115f6b1d3b4db61","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        # but after the marker instance which may have been in another cell."},{"line_number":144,"context_line":"        local_marker \u003d None"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        # Since the regular DB query routines take a marker and assume that"},{"line_number":147,"context_line":"        # the marked instance was the last entry of the previous page, we"},{"line_number":148,"context_line":"        # may need to prefix it to our result query if we\u0027re not the cell"},{"line_number":149,"context_line":"        # that had the actual marker instance."}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_43e619eb","line":146,"range":{"start_line":146,"start_character":64,"end_line":146,"end_character":70},"in_reply_to":"7f515b1d_8375319b","updated":"2017-09-22 01:52:54.000000000","message":"Oh yeah, \"take\". I kept reading that as \"takes\".","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0dd77a4571cd7a2f21dc3e7e33b473666fb1b04d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            # FIXME(danms): If we knew which cell we were in here, we could"},{"line_number":154,"context_line":"            # avoid looking up the marker again. But, we don\u0027t currently."},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            local_marker \u003d db.instance_get_by_sort_filters("},{"line_number":157,"context_line":"                ctx, sort_keys, sort_dirs, global_marker_values)"},{"line_number":158,"context_line":"            if local_marker:"},{"line_number":159,"context_line":"                if local_marker !\u003d marker:"},{"line_number":160,"context_line":"                    # We did find a marker in our cell, but it wasn\u0027t"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_30d5a5ba","line":157,"range":{"start_line":156,"start_character":12,"end_line":157,"end_character":64},"updated":"2017-09-22 01:19:48.000000000","message":"OK, so get me the first instance in this cell whose values come after the global marker\u0027s sort values.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"}],"nova/tests/functional/compute/test_instance_list.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0dd77a4571cd7a2f21dc3e7e33b473666fb1b04d","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.assertEqual(sorted(uuids), uuids)"},{"line_number":132,"context_line":"        self.assertEqual(len(self.instances), len(uuids))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _test_get_sorted_with_limit_marker(self, sort_by, pages\u003d2, pagesize\u003d2):"},{"line_number":135,"context_line":"        insts \u003d []"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        page \u003d 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_7050bd33","line":134,"range":{"start_line":134,"start_character":58,"end_line":134,"end_character":63},"updated":"2017-09-22 01:19:48.000000000","message":"Is this the expected number of pages? If so, rename to expected_pages.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1acfe1ab307588e7d10a1f2aff4e1bf38aeea934","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.assertEqual(sorted(uuids), uuids)"},{"line_number":132,"context_line":"        self.assertEqual(len(self.instances), len(uuids))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _test_get_sorted_with_limit_marker(self, sort_by, pages\u003d2, pagesize\u003d2):"},{"line_number":135,"context_line":"        insts \u003d []"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        page \u003d 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_c36209d9","line":134,"range":{"start_line":134,"start_character":58,"end_line":134,"end_character":63},"in_reply_to":"7f515b1d_7050bd33","updated":"2017-09-22 01:32:05.000000000","message":"no, it\u0027s the number of pages we\u0027ll request before we request a final unlimited one. I\u0027ll docstring it.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0dd77a4571cd7a2f21dc3e7e33b473666fb1b04d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        insts \u003d []"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        page \u003d 0"},{"line_number":138,"context_line":"        while True:"},{"line_number":139,"context_line":"            if page \u003e\u003d pages:"},{"line_number":140,"context_line":"                limit \u003d None"},{"line_number":141,"context_line":"            else:"},{"line_number":142,"context_line":"                limit \u003d pagesize"},{"line_number":143,"context_line":"            if insts:"},{"line_number":144,"context_line":"                marker \u003d insts[-1][\u0027uuid\u0027]"},{"line_number":145,"context_line":"            else:"},{"line_number":146,"context_line":"                marker \u003d None"},{"line_number":147,"context_line":"            batch \u003d list("},{"line_number":148,"context_line":"                instance_list.get_instances_sorted(self.context, {},"},{"line_number":149,"context_line":"                                                   limit, marker,"},{"line_number":150,"context_line":"                                                   [], [sort_by], [\u0027asc\u0027]))"},{"line_number":151,"context_line":"            if not batch:"},{"line_number":152,"context_line":"                break"},{"line_number":153,"context_line":"            insts.extend(batch)"},{"line_number":154,"context_line":"            page +\u003d 1"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # We should have requested exactly (or one more unlimited) pages"},{"line_number":157,"context_line":"        self.assertIn(page, (pages, pages + 1))"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_d0aad117","line":154,"range":{"start_line":138,"start_character":8,"end_line":154,"end_character":21},"updated":"2017-09-22 01:19:48.000000000","message":"This could use some words.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a977a6ce7602e997474fca5e824a80cd3c22d550","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                                                   filters,"},{"line_number":256,"context_line":"                                                   1, marker, [],"},{"line_number":257,"context_line":"                                                   [\u0027hostname\u0027],"},{"line_number":258,"context_line":"                                                   [\u0027asc\u0027]))"},{"line_number":259,"context_line":"            if not batch:"},{"line_number":260,"context_line":"                break"},{"line_number":261,"context_line":"            found_uuids.extend([x[\u0027uuid\u0027] for x in batch])"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_e3c18582","line":258,"range":{"start_line":258,"start_character":52,"end_line":258,"end_character":57},"updated":"2017-09-22 01:34:51.000000000","message":"I feel like we should have some of these use \u0027desc\u0027 to verify paging works as expected with descending order.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3863b17794445402a8b19a65bcc1a386bffa5962","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                                                   filters,"},{"line_number":256,"context_line":"                                                   1, marker, [],"},{"line_number":257,"context_line":"                                                   [\u0027hostname\u0027],"},{"line_number":258,"context_line":"                                                   [\u0027asc\u0027]))"},{"line_number":259,"context_line":"            if not batch:"},{"line_number":260,"context_line":"                break"},{"line_number":261,"context_line":"            found_uuids.extend([x[\u0027uuid\u0027] for x in batch])"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_43aa9985","line":258,"range":{"start_line":258,"start_character":52,"end_line":258,"end_character":57},"in_reply_to":"7f515b1d_e3c18582","updated":"2017-09-22 01:45:25.000000000","message":"I was thinking that the sort direction is related to how the local markers will be found, so maybe we should use \u0027desc\u0027 here to test that. I\u0027m getting a bit mixed up about whether that\u0027s already covered between the initial compare_instances tests and this patch.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0dd77a4571cd7a2f21dc3e7e33b473666fb1b04d","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        \"\"\""},{"line_number":273,"context_line":"        # Pick a set of the instances by uuid, when sorted by uuid"},{"line_number":274,"context_line":"        all_uuids \u003d [x[\u0027uuid\u0027] for x in self.instances]"},{"line_number":275,"context_line":"        filters \u003d {\u0027uuid\u0027: sorted(all_uuids)[:7]}"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        found_uuids \u003d self._test_get_paginated_with_filter(filters)"},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7f515b1d_b02ab58d","line":275,"range":{"start_line":275,"start_character":44,"end_line":275,"end_character":48},"updated":"2017-09-22 01:19:48.000000000","message":"OK and we have a total of 9 instances so this is a good subset test. Just taking notes.","commit_id":"1f950e2c1e6a107e2231722228eb755ac50f4983"}]}
