)]}'
{"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"292e6d5d54c076f506158ad67369465d50bb4c0c","unresolved":false,"context_lines":[{"line_number":1834,"context_line":"            soft_delete()"},{"line_number":1835,"context_line":"    model_query(context, models.BlockDeviceMapping).\\"},{"line_number":1836,"context_line":"            filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":1837,"context_line":"            soft_delete()"},{"line_number":1838,"context_line":"    # NOTE(snikitin): We can\u0027t use model_query here, because there is no"},{"line_number":1839,"context_line":"    # column \u0027deleted\u0027 in \u0027tags\u0027 table."},{"line_number":1840,"context_line":"    context.session.query(models.Tag).filter_by("}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_08281132","line":1837,"updated":"2016-08-02 09:12:30.000000000","message":"Why not soft-delete migration rows here? That would be consistent with what we do to other tables which reference instances table. And it would also mean we soft-delete an instance and all related rows in the same DB transaction.","commit_id":"6283a0de4cd27c2cda97ba105bd440e03096ca9c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"df472841a309c08128e4bd9134cda72d06501e61","unresolved":false,"context_lines":[{"line_number":1834,"context_line":"            soft_delete()"},{"line_number":1835,"context_line":"    model_query(context, models.BlockDeviceMapping).\\"},{"line_number":1836,"context_line":"            filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":1837,"context_line":"            soft_delete()"},{"line_number":1838,"context_line":"    # NOTE(snikitin): We can\u0027t use model_query here, because there is no"},{"line_number":1839,"context_line":"    # column \u0027deleted\u0027 in \u0027tags\u0027 table."},{"line_number":1840,"context_line":"    context.session.query(models.Tag).filter_by("}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_3c5fdb0f","line":1837,"in_reply_to":"bacf61ea_08281132","updated":"2016-08-03 08:02:57.000000000","message":"If the instance is migrated many times, there are many records in the table. So it had better be processed by batch instead of online.","commit_id":"6283a0de4cd27c2cda97ba105bd440e03096ca9c"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"9ec26581f7df56d43d5cfd36c9491b69d9fe0a0c","unresolved":false,"context_lines":[{"line_number":1834,"context_line":"            soft_delete()"},{"line_number":1835,"context_line":"    model_query(context, models.BlockDeviceMapping).\\"},{"line_number":1836,"context_line":"            filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":1837,"context_line":"            soft_delete()"},{"line_number":1838,"context_line":"    # NOTE(snikitin): We can\u0027t use model_query here, because there is no"},{"line_number":1839,"context_line":"    # column \u0027deleted\u0027 in \u0027tags\u0027 table."},{"line_number":1840,"context_line":"    context.session.query(models.Tag).filter_by("}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_7fbe65d5","line":1837,"in_reply_to":"bacf61ea_3c5fdb0f","updated":"2016-08-03 08:26:36.000000000","message":"How is that? I\u0027m struggling to see why it\u0027s better to update *more* rows at once later during archiving when we could spread the load by doing batch (in a sense that we update all the associated migration rows at once) updates on soft-deletion of each instance.","commit_id":"6283a0de4cd27c2cda97ba105bd440e03096ca9c"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"292e6d5d54c076f506158ad67369465d50bb4c0c","unresolved":false,"context_lines":[{"line_number":6300,"context_line":"    # NOTE(clecomte): Tables instance_actions and instances_actions_events"},{"line_number":6301,"context_line":"    # have to be manage differently so we soft-delete them here to let"},{"line_number":6302,"context_line":"    # the archive work the same for all tables"},{"line_number":6303,"context_line":"    if tablename in (\"instance_actions\", \"migrations\"):"},{"line_number":6304,"context_line":"        instances \u003d models.BASE.metadata.tables[\"instances\"]"},{"line_number":6305,"context_line":"        deleted_instances \u003d sql.select([instances.c.uuid]).\\"},{"line_number":6306,"context_line":"            where(instances.c.deleted !\u003d instances.c.deleted.default.arg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_48ccc988","line":6303,"updated":"2016-08-02 09:12:30.000000000","message":"We\u0027d still need to this to make sure archiving works for already deleted instances that had been previously migrated.","commit_id":"6283a0de4cd27c2cda97ba105bd440e03096ca9c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"df472841a309c08128e4bd9134cda72d06501e61","unresolved":false,"context_lines":[{"line_number":6300,"context_line":"    # NOTE(clecomte): Tables instance_actions and instances_actions_events"},{"line_number":6301,"context_line":"    # have to be manage differently so we soft-delete them here to let"},{"line_number":6302,"context_line":"    # the archive work the same for all tables"},{"line_number":6303,"context_line":"    if tablename in (\"instance_actions\", \"migrations\"):"},{"line_number":6304,"context_line":"        instances \u003d models.BASE.metadata.tables[\"instances\"]"},{"line_number":6305,"context_line":"        deleted_instances \u003d sql.select([instances.c.uuid]).\\"},{"line_number":6306,"context_line":"            where(instances.c.deleted !\u003d instances.c.deleted.default.arg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_dc567f05","line":6303,"in_reply_to":"bacf61ea_48ccc988","updated":"2016-08-03 08:02:57.000000000","message":"See line 6308.","commit_id":"6283a0de4cd27c2cda97ba105bd440e03096ca9c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"df472841a309c08128e4bd9134cda72d06501e61","unresolved":false,"context_lines":[{"line_number":6305,"context_line":"        deleted_instances \u003d sql.select([instances.c.uuid]).\\"},{"line_number":6306,"context_line":"            where(instances.c.deleted !\u003d instances.c.deleted.default.arg)"},{"line_number":6307,"context_line":"        update_statement \u003d table.update().values(deleted\u003dtable.c.id).\\"},{"line_number":6308,"context_line":"            where(table.c.instance_uuid.in_(deleted_instances))"},{"line_number":6309,"context_line":""},{"line_number":6310,"context_line":"        conn.execute(update_statement)"},{"line_number":6311,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_fc3d43bc","line":6308,"range":{"start_line":6308,"start_character":44,"end_line":6308,"end_character":61},"updated":"2016-08-03 08:02:57.000000000","message":"Here","commit_id":"6283a0de4cd27c2cda97ba105bd440e03096ca9c"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"f6313ebb9f2932bded009a6a487ec26054e3f215","unresolved":false,"context_lines":[{"line_number":1834,"context_line":"            soft_delete()"},{"line_number":1835,"context_line":"    model_query(context, models.BlockDeviceMapping).\\"},{"line_number":1836,"context_line":"            filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":1837,"context_line":"            soft_delete()"},{"line_number":1838,"context_line":"    # NOTE(snikitin): We can\u0027t use model_query here, because there is no"},{"line_number":1839,"context_line":"    # column \u0027deleted\u0027 in \u0027tags\u0027 table."},{"line_number":1840,"context_line":"    context.session.query(models.Tag).filter_by("}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_800495c6","line":1837,"updated":"2016-08-03 10:13:10.000000000","message":"I still think you should soft_delete() associated migration rows here: this way you would update less number of rows on each deletion of an instance, rather than doing a (much?) bigger update later when archiving deleted instance rows.","commit_id":"2ee704f36ac2011aba41961bfcf48ee6b7a37da3"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"8d410d6bd7924ab4b335859f70db5a1312072688","unresolved":false,"context_lines":[{"line_number":1834,"context_line":"            soft_delete()"},{"line_number":1835,"context_line":"    model_query(context, models.BlockDeviceMapping).\\"},{"line_number":1836,"context_line":"            filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":1837,"context_line":"            soft_delete()"},{"line_number":1838,"context_line":"    # NOTE(snikitin): We can\u0027t use model_query here, because there is no"},{"line_number":1839,"context_line":"    # column \u0027deleted\u0027 in \u0027tags\u0027 table."},{"line_number":1840,"context_line":"    context.session.query(models.Tag).filter_by("}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_c9d5ad43","line":1837,"in_reply_to":"bacf61ea_1b69eff9","updated":"2016-08-05 04:34:54.000000000","message":"If the instance is migrated many times, there are many records in the table. So it had better not be processed when deleting the instance.(It may take long time to finish deleting the instance.)","commit_id":"2ee704f36ac2011aba41961bfcf48ee6b7a37da3"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"3696a20a728df7e7894382084ef41a1420cd93ad","unresolved":false,"context_lines":[{"line_number":1834,"context_line":"            soft_delete()"},{"line_number":1835,"context_line":"    model_query(context, models.BlockDeviceMapping).\\"},{"line_number":1836,"context_line":"            filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":1837,"context_line":"            soft_delete()"},{"line_number":1838,"context_line":"    # NOTE(snikitin): We can\u0027t use model_query here, because there is no"},{"line_number":1839,"context_line":"    # column \u0027deleted\u0027 in \u0027tags\u0027 table."},{"line_number":1840,"context_line":"    context.session.query(models.Tag).filter_by("}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_1b69eff9","line":1837,"in_reply_to":"bacf61ea_800495c6","updated":"2016-08-04 13:13:49.000000000","message":"A very similar case here https://review.openstack.org/#/c/345191/\n\nI\u0027d go for a combined solution: soft-deleting of the associated rows here and having an enforcement in _archive_deleted_rows_for_table() to cover the upgrade case (should we have soft deleted but not archived instances rows with associated migrations by the time this code is deployed)","commit_id":"2ee704f36ac2011aba41961bfcf48ee6b7a37da3"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"f9ba1b15a3575e9c00eb394d6832fecf3830c4b1","unresolved":false,"context_lines":[{"line_number":1834,"context_line":"            soft_delete()"},{"line_number":1835,"context_line":"    model_query(context, models.BlockDeviceMapping).\\"},{"line_number":1836,"context_line":"            filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":1837,"context_line":"            soft_delete()"},{"line_number":1838,"context_line":"    # NOTE(snikitin): We can\u0027t use model_query here, because there is no"},{"line_number":1839,"context_line":"    # column \u0027deleted\u0027 in \u0027tags\u0027 table."},{"line_number":1840,"context_line":"    context.session.query(models.Tag).filter_by("}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_003e6f8a","line":1837,"in_reply_to":"bacf61ea_c9d5ad43","updated":"2016-08-05 08:46:58.000000000","message":"I\u0027d argue we have more instance metadata or block device mapping entries which are soft deleted above. And what\u0027s the other option - soft delete them in bulk during archiving, which is even more rows to process at once. I\u0027d rather we spread the load over time and soft-delete per instance instead.","commit_id":"2ee704f36ac2011aba41961bfcf48ee6b7a37da3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a7e002d1cc50d1f37a32e1bbdfbfa39b6d41155","unresolved":false,"context_lines":[{"line_number":6314,"context_line":"    # NOTE(clecomte): Tables instance_actions and instances_actions_events"},{"line_number":6315,"context_line":"    # have to be manage differently so we soft-delete them here to let"},{"line_number":6316,"context_line":"    # the archive work the same for all tables"},{"line_number":6317,"context_line":"    if tablename in (\"instance_actions\", \"migrations\"):"},{"line_number":6318,"context_line":"        instances \u003d models.BASE.metadata.tables[\"instances\"]"},{"line_number":6319,"context_line":"        deleted_instances \u003d sql.select([instances.c.uuid]).\\"},{"line_number":6320,"context_line":"            where(instances.c.deleted !\u003d instances.c.deleted.default.arg)"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a8ec9b2_0cee5522","line":6317,"range":{"start_line":6317,"start_character":42,"end_line":6317,"end_character":52},"updated":"2016-09-14 00:31:55.000000000","message":"It would probably be good to have a note/comment like above about why we have to handle this differently.\n\nAlso, why don\u0027t we delete migrations when we delete an instance, like the other referential tables here:\n\nhttps://github.com/openstack/nova/blob/8211d3fade1b44173a8d6d54d1918b9f0bc26d4e/nova/db/sqlalchemy/api.py#L1801\n\n-1 for that.","commit_id":"41600e3fecf3aa2640ef21a2dc9ce33b2aa13411"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bff615252483f373a09e89d6c236f424c67e36b0","unresolved":false,"context_lines":[{"line_number":6314,"context_line":"    # NOTE(clecomte): Tables instance_actions and instances_actions_events"},{"line_number":6315,"context_line":"    # have to be manage differently so we soft-delete them here to let"},{"line_number":6316,"context_line":"    # the archive work the same for all tables"},{"line_number":6317,"context_line":"    if tablename in (\"instance_actions\", \"migrations\"):"},{"line_number":6318,"context_line":"        instances \u003d models.BASE.metadata.tables[\"instances\"]"},{"line_number":6319,"context_line":"        deleted_instances \u003d sql.select([instances.c.uuid]).\\"},{"line_number":6320,"context_line":"            where(instances.c.deleted !\u003d instances.c.deleted.default.arg)"}],"source_content_type":"text/x-python","patch_set":27,"id":"7a8ec9b2_8cd8a5f1","line":6317,"range":{"start_line":6317,"start_character":42,"end_line":6317,"end_character":52},"in_reply_to":"7a8ec9b2_0cee5522","updated":"2016-09-14 00:33:23.000000000","message":"More like the pattern here probably:\n\nhttps://review.openstack.org/#/c/345191/4/nova/db/sqlalchemy/api.py","commit_id":"41600e3fecf3aa2640ef21a2dc9ce33b2aa13411"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a103699a4eda862c9a19e80eb57859e6594b0a5","unresolved":false,"context_lines":[{"line_number":6317,"context_line":"    # NOTE(clecomte): Tables instance_actions and instances_actions_events"},{"line_number":6318,"context_line":"    # have to be manage differently so we soft-delete them here to let"},{"line_number":6319,"context_line":"    # the archive work the same for all tables"},{"line_number":6320,"context_line":"    # NOTE(takashin): The record in table migrations should be"},{"line_number":6321,"context_line":"    # soft deleted when the instance is deleted."},{"line_number":6322,"context_line":"    # This is just for upgrading."},{"line_number":6323,"context_line":"    if tablename in (\"instance_actions\", \"migrations\"):"},{"line_number":6324,"context_line":"        instances \u003d models.BASE.metadata.tables[\"instances\"]"},{"line_number":6325,"context_line":"        deleted_instances \u003d sql.select([instances.c.uuid]).\\"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_a1c0bf2b","line":6322,"range":{"start_line":6320,"start_character":4,"end_line":6322,"end_character":33},"updated":"2016-09-15 01:29:07.000000000","message":"The NOTE should really be a TODO, and see this dev list thread for ideas on fixing this long-term:\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2016-September/103709.html","commit_id":"1dfd79495e565eda3997b0a272c594a8d2c422d4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e248fac70d53629401ba8a2e55493b493f8812f2","unresolved":false,"context_lines":[{"line_number":6320,"context_line":"    # NOTE(takashin): The record in table migrations should be"},{"line_number":6321,"context_line":"    # soft deleted when the instance is deleted."},{"line_number":6322,"context_line":"    # This is just for upgrading."},{"line_number":6323,"context_line":"    if tablename in (\"instance_actions\", \"migrations\"):"},{"line_number":6324,"context_line":"        instances \u003d models.BASE.metadata.tables[\"instances\"]"},{"line_number":6325,"context_line":"        deleted_instances \u003d sql.select([instances.c.uuid]).\\"},{"line_number":6326,"context_line":"            where(instances.c.deleted !\u003d instances.c.deleted.default.arg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_9feddef1","line":6323,"updated":"2016-09-15 03:08:33.000000000","message":"Even though we\u0027re now soft-deleting migration records along with instances, this is still needed to clean up old migration records.","commit_id":"1dfd79495e565eda3997b0a272c594a8d2c422d4"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"72f6cd3b8653ebbe830c4857737f2adbccb68da4","unresolved":false,"context_lines":[{"line_number":8974,"context_line":"        ins_stmt \u003d self.migrations.insert().values(instance_uuid\u003dinstance_uuid,"},{"line_number":8975,"context_line":"                                                   deleted\u003d0)"},{"line_number":8976,"context_line":"        self.conn.execute(ins_stmt)"},{"line_number":8977,"context_line":"        # The first try to archive console_pools should fail, due to FK."},{"line_number":8978,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"instances\","},{"line_number":8979,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8980,"context_line":"        self.assertEqual(0, num)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_61c4e391","line":8977,"range":{"start_line":8977,"start_character":8,"end_line":8977,"end_character":72},"updated":"2016-07-25 12:45:43.000000000","message":"this looks like a copy-paste from test_archive_deleted_rows_fk_constraint. I wonder, could it possible to test migrations there too? If no, please update comments.","commit_id":"a76624331ba12c1faf42aba893c7863118ab6d1b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b4843925c091789b776779682c7b639dc06db6ff","unresolved":false,"context_lines":[{"line_number":8974,"context_line":"        ins_stmt \u003d self.migrations.insert().values(instance_uuid\u003dinstance_uuid,"},{"line_number":8975,"context_line":"                                                   deleted\u003d0)"},{"line_number":8976,"context_line":"        self.conn.execute(ins_stmt)"},{"line_number":8977,"context_line":"        # The first try to archive console_pools should fail, due to FK."},{"line_number":8978,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"instances\","},{"line_number":8979,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8980,"context_line":"        self.assertEqual(0, num)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_f8b85813","line":8977,"range":{"start_line":8977,"start_character":8,"end_line":8977,"end_character":72},"in_reply_to":"dada55a8_61c4e391","updated":"2016-07-26 07:34:29.000000000","message":"Done","commit_id":"a76624331ba12c1faf42aba893c7863118ab6d1b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"72f6cd3b8653ebbe830c4857737f2adbccb68da4","unresolved":false,"context_lines":[{"line_number":8978,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"instances\","},{"line_number":8979,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8980,"context_line":"        self.assertEqual(0, num)"},{"line_number":8981,"context_line":"        # Then archiving consoles should work."},{"line_number":8982,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"migrations\","},{"line_number":8983,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8984,"context_line":"        self.assertEqual(1, num)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_41bf1ffc","line":8981,"range":{"start_line":8981,"start_character":8,"end_line":8981,"end_character":46},"updated":"2016-07-25 12:45:43.000000000","message":"ditto","commit_id":"a76624331ba12c1faf42aba893c7863118ab6d1b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b4843925c091789b776779682c7b639dc06db6ff","unresolved":false,"context_lines":[{"line_number":8978,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"instances\","},{"line_number":8979,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8980,"context_line":"        self.assertEqual(0, num)"},{"line_number":8981,"context_line":"        # Then archiving consoles should work."},{"line_number":8982,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"migrations\","},{"line_number":8983,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8984,"context_line":"        self.assertEqual(1, num)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_583884a0","line":8981,"range":{"start_line":8981,"start_character":8,"end_line":8981,"end_character":46},"in_reply_to":"dada55a8_41bf1ffc","updated":"2016-07-26 07:34:29.000000000","message":"Done","commit_id":"a76624331ba12c1faf42aba893c7863118ab6d1b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"72f6cd3b8653ebbe830c4857737f2adbccb68da4","unresolved":false,"context_lines":[{"line_number":8982,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"migrations\","},{"line_number":8983,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8984,"context_line":"        self.assertEqual(1, num)"},{"line_number":8985,"context_line":"        # Then archiving console_pools should work."},{"line_number":8986,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"instances\","},{"line_number":8987,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8988,"context_line":"        self.assertEqual(1, num)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_e13613b3","line":8985,"range":{"start_line":8985,"start_character":8,"end_line":8985,"end_character":51},"updated":"2016-07-25 12:45:43.000000000","message":"ditto","commit_id":"a76624331ba12c1faf42aba893c7863118ab6d1b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b4843925c091789b776779682c7b639dc06db6ff","unresolved":false,"context_lines":[{"line_number":8982,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"migrations\","},{"line_number":8983,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8984,"context_line":"        self.assertEqual(1, num)"},{"line_number":8985,"context_line":"        # Then archiving console_pools should work."},{"line_number":8986,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"instances\","},{"line_number":8987,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":8988,"context_line":"        self.assertEqual(1, num)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_383dd08f","line":8985,"range":{"start_line":8985,"start_character":8,"end_line":8985,"end_character":51},"in_reply_to":"dada55a8_e13613b3","updated":"2016-07-26 07:34:29.000000000","message":"Done","commit_id":"a76624331ba12c1faf42aba893c7863118ab6d1b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"292e6d5d54c076f506158ad67369465d50bb4c0c","unresolved":false,"context_lines":[{"line_number":8955,"context_line":"    def test_archive_deleted_rows_for_migrations(self):"},{"line_number":8956,"context_line":"        # migrations.instance_uuid depends on instances.uuid"},{"line_number":8957,"context_line":"        # SQLite doesn\u0027t enforce foreign key constraints without a pragma."},{"line_number":8958,"context_line":"        dialect \u003d self.engine.url.get_dialect()"},{"line_number":8959,"context_line":"        if dialect \u003d\u003d sqlite.dialect:"},{"line_number":8960,"context_line":"            # We\u0027re seeing issues with foreign key support in SQLite 3.6.20"},{"line_number":8961,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with \u003c SQLite 3.6.19"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_08b2d1e4","line":8958,"updated":"2016-08-02 09:12:30.000000000","message":"nit: this is used in  two test cases now and probably could be extracted into a separate helper function","commit_id":"6283a0de4cd27c2cda97ba105bd440e03096ca9c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"df472841a309c08128e4bd9134cda72d06501e61","unresolved":false,"context_lines":[{"line_number":8955,"context_line":"    def test_archive_deleted_rows_for_migrations(self):"},{"line_number":8956,"context_line":"        # migrations.instance_uuid depends on instances.uuid"},{"line_number":8957,"context_line":"        # SQLite doesn\u0027t enforce foreign key constraints without a pragma."},{"line_number":8958,"context_line":"        dialect \u003d self.engine.url.get_dialect()"},{"line_number":8959,"context_line":"        if dialect \u003d\u003d sqlite.dialect:"},{"line_number":8960,"context_line":"            # We\u0027re seeing issues with foreign key support in SQLite 3.6.20"},{"line_number":8961,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with \u003c SQLite 3.6.19"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_791cc577","line":8958,"in_reply_to":"bacf61ea_08b2d1e4","updated":"2016-08-03 08:02:57.000000000","message":"Done","commit_id":"6283a0de4cd27c2cda97ba105bd440e03096ca9c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a103699a4eda862c9a19e80eb57859e6594b0a5","unresolved":false,"context_lines":[{"line_number":9122,"context_line":"        self.conn.execute(ins_stmt)"},{"line_number":9123,"context_line":"        # The first try to archive instances should fail, due to FK."},{"line_number":9124,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"instances\","},{"line_number":9125,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":9126,"context_line":"        self.assertEqual(0, num)"},{"line_number":9127,"context_line":"        # Then archiving migrations should work."},{"line_number":9128,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"migrations\","}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_61f4f786","line":9125,"range":{"start_line":9125,"start_character":70,"end_line":9125,"end_character":74},"updated":"2016-09-15 01:29:07.000000000","message":"How is this handled? Does it mean effectively no limit? I think the command line requires a value for the limit (which is actually kind of dumb since it doesn\u0027t work well).","commit_id":"1dfd79495e565eda3997b0a272c594a8d2c422d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a103699a4eda862c9a19e80eb57859e6594b0a5","unresolved":false,"context_lines":[{"line_number":9127,"context_line":"        # Then archiving migrations should work."},{"line_number":9128,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"migrations\","},{"line_number":9129,"context_line":"                                                             max_rows\u003dNone)"},{"line_number":9130,"context_line":"        self.assertEqual(1, num)"},{"line_number":9131,"context_line":"        # Then archiving instances should work."},{"line_number":9132,"context_line":"        num \u003d sqlalchemy_api._archive_deleted_rows_for_table(\"instances\","},{"line_number":9133,"context_line":"                                                             max_rows\u003dNone)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_814ae3c3","line":9130,"updated":"2016-09-15 01:29:07.000000000","message":"max_rows\u003dNone must work because otherwise this wouldn\u0027t delete anything.","commit_id":"1dfd79495e565eda3997b0a272c594a8d2c422d4"}]}
