)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":12,"context_line":"rows from production tables to the corresponding shadow tables."},{"line_number":13,"context_line":"(It only does a few rows, to avoid blocking the process or hitting"},{"line_number":14,"context_line":"the database too hard. So it needs to be called regularly.)"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Code from https://review.openstack.org/#/c/18493/34"},{"line_number":17,"context_line":"Spec review-request: https://review.openstack.org/135916"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"fa81d914_233e41b9","line":15,"updated":"2015-01-28 14:48:42.000000000","message":"This also creates a new CLI command. Do you think a \u0027docimpact\u0027 flag would make sense here?","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"feba26c2ef6c3199fd0f9ec5f358dbc640a4526d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Code is based on https://review.openstack.org/#/c/18493/34"},{"line_number":17,"context_line":"Spec review-request: https://review.openstack.org/135916"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Implements bp db-archiving"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Ib536830e2e69b93d1514311561b6a3aeccdeb0ea"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"ba7be1f8_0e1a76c5","line":19,"updated":"2015-02-26 18:46:57.000000000","message":"Can you add DocImpact here please as it change the cinder-manage options.","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"71f00a9ae5b8c4944439deed018f8b4c5260a682","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Code is based on https://review.openstack.org/#/c/18493/34"},{"line_number":17,"context_line":"Spec review-request: https://review.openstack.org/135916"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Implements bp db-archiving"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Ib536830e2e69b93d1514311561b6a3aeccdeb0ea"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"ba7be1f8_fcb95116","line":19,"in_reply_to":"ba7be1f8_0e1a76c5","updated":"2015-02-26 20:50:08.000000000","message":"Done","commit_id":"186afe7f402c8998368408af5677099b6aecd251"}],"bin/cinder-manage":[{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"09ce6ffb22a30504f907318546da11cb374378f1","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        \"\"\"Print the current database version.\"\"\""},{"line_number":233,"context_line":"        print(migration.db_version())"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @args(\u0027--max_rows\u0027, dest\u003d\u0027max_rows\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":236,"context_line":"          help\u003d\u0027Maximum number of deleted rows to archive\u0027)"},{"line_number":237,"context_line":"    def archive_deleted_rows(self, max_rows\u003dNone):"},{"line_number":238,"context_line":"        \"\"\"Move up to max_rows deleted rows from production tables to shadow"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"9aa7fdbe_392ea1fb","line":235,"updated":"2014-10-28 16:09:03.000000000","message":"I suspect many people trying this out (myself included) will only want to archive \u0027old\u0027 rows, for some definition of old, so adding a \u0027min days since last_updated\u0027 option here will make this easier for such people. Default it to 0 and you keep the current behaviour.","commit_id":"5396744596329d02c07e47e0479fc379ef3817ea"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7aebc3ffebf014d79ec2dbfc8d6f8d1c95af69e8","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        \"\"\"Print the current database version.\"\"\""},{"line_number":233,"context_line":"        print(migration.db_version())"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @args(\u0027--max_rows\u0027, dest\u003d\u0027max_rows\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":236,"context_line":"          help\u003d\u0027Maximum number of deleted rows to archive\u0027)"},{"line_number":237,"context_line":"    def archive_deleted_rows(self, max_rows\u003dNone):"},{"line_number":238,"context_line":"        \"\"\"Move up to max_rows deleted rows from production tables to shadow"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"9aa7fdbe_79e749ac","line":235,"in_reply_to":"9aa7fdbe_392ea1fb","updated":"2014-10-28 16:14:28.000000000","message":"Thanks Duncan, I\u0027ll do it in a next version. Now, I\u0027m working on spec","commit_id":"5396744596329d02c07e47e0479fc379ef3817ea"}],"cinder/cmd/manage.py":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    @args(\u0027--max_rows\u0027, dest\u003d\u0027max_rows\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":239,"context_line":"          help\u003d\u0027Maximum number of deleted rows to archive\u0027)"},{"line_number":240,"context_line":"    @args(\u0027--last_updated\u0027, dest\u003d\u0027last_updated\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":241,"context_line":"          help\u003d\u0027Maximum rows age (in days) to archive\u0027)"},{"line_number":242,"context_line":"    def archive_deleted_rows(self, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":243,"context_line":"        \"\"\"Move up to max_rows deleted rows from production tables to shadow"},{"line_number":244,"context_line":"        tables."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_03ce9d83","line":241,"updated":"2015-01-28 14:48:42.000000000","message":"Actually it\u0027s the minimum row age in days which we archive, if I am correct. I would prefer if this help string can be reworded to be less ambiguous:\n\n Integer value of number of days. Rows older than last_updated number of days will be deleted.","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"763f204a39caac49f7ff2e7667f29b8f88d4db95","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    @args(\u0027--max_rows\u0027, dest\u003d\u0027max_rows\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":239,"context_line":"          help\u003d\u0027Maximum number of deleted rows to archive\u0027)"},{"line_number":240,"context_line":"    @args(\u0027--last_updated\u0027, dest\u003d\u0027last_updated\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":241,"context_line":"          help\u003d\u0027Maximum rows age (in days) to archive\u0027)"},{"line_number":242,"context_line":"    def archive_deleted_rows(self, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":243,"context_line":"        \"\"\"Move up to max_rows deleted rows from production tables to shadow"},{"line_number":244,"context_line":"        tables."}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_82bb670d","line":241,"in_reply_to":"fa81d914_03ce9d83","updated":"2015-02-02 13:06:21.000000000","message":"Done","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    @args(\u0027--last_updated\u0027, dest\u003d\u0027last_updated\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":241,"context_line":"          help\u003d\u0027Maximum rows age (in days) to archive\u0027)"},{"line_number":242,"context_line":"    def archive_deleted_rows(self, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":243,"context_line":"        \"\"\"Move up to max_rows deleted rows from production tables to shadow"},{"line_number":244,"context_line":"        tables."},{"line_number":245,"context_line":"        \"\"\""},{"line_number":246,"context_line":"        if max_rows is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_63bbd90e","line":243,"updated":"2015-01-28 14:48:42.000000000","message":"Two nits: \n\n1. First line of docstringn should end with a dot, followed by an empty line and then the description.\n2. The docstring only talks about max_rows arg, and not about last_updated one. It should talk about both..","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"763f204a39caac49f7ff2e7667f29b8f88d4db95","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    @args(\u0027--last_updated\u0027, dest\u003d\u0027last_updated\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":241,"context_line":"          help\u003d\u0027Maximum rows age (in days) to archive\u0027)"},{"line_number":242,"context_line":"    def archive_deleted_rows(self, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":243,"context_line":"        \"\"\"Move up to max_rows deleted rows from production tables to shadow"},{"line_number":244,"context_line":"        tables."},{"line_number":245,"context_line":"        \"\"\""},{"line_number":246,"context_line":"        if max_rows is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_62f113cd","line":243,"in_reply_to":"fa81d914_63bbd90e","updated":"2015-02-02 13:06:21.000000000","message":"Done","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"4a8f8ebd0ad1fa53e256d9180e117a3d16281326","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        \"\"\"Archive deleted rows from production tables to shadow tables."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        Move up to max_rows deleted with age more than last_updated days."},{"line_number":247,"context_line":"        If max_rows is not provided, the default value will be 5000 rows."},{"line_number":248,"context_line":"        \"\"\""},{"line_number":249,"context_line":"        if max_rows is not None:"},{"line_number":250,"context_line":"            max_rows \u003d int(max_rows)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_1e886fe6","line":247,"updated":"2015-02-03 16:45:56.000000000","message":"As per my previous comment, this docstring should also talk about last_updated argument","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"559e92779444e9de5f59c4cf3c758b73f17c847f","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        \"\"\"Archive deleted rows from production tables to shadow tables."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        Move up to max_rows deleted with age more than last_updated days."},{"line_number":247,"context_line":"        If max_rows is not provided, the default value will be 5000 rows."},{"line_number":248,"context_line":"        \"\"\""},{"line_number":249,"context_line":"        if max_rows is not None:"},{"line_number":250,"context_line":"            max_rows \u003d int(max_rows)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_b0006c02","line":247,"in_reply_to":"da86d52c_1e886fe6","updated":"2015-02-03 17:41:03.000000000","message":"My fail, I\u0027ll do it in a next patch","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"5fa8985a99a4a759006854cf0d2020dae7f3b256","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        db.purge_deleted_rows(ctxt, age_in_days)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @args(\u0027--max_rows\u0027, dest\u003d\u0027max_rows\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":250,"context_line":"          help\u003d\u0027Maximum number of deleted rows to archive\u0027)"},{"line_number":251,"context_line":"    @args(\u0027--last_updated\u0027, dest\u003d\u0027last_updated\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":252,"context_line":"          help\u003d\u0027Integer value of number of days. \u0027"},{"line_number":253,"context_line":"          \u0027Rows older than last_updated number of days will be deleted.\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_c7893f27","line":250,"updated":"2015-02-19 16:35:36.000000000","message":"Can\u0027t we specify the default here so, admins know what the default max is if they run the command line help?","commit_id":"c320d15080139446c9a06b6c7d4b976dd8b367f0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"292ee1b21409a672cc25f7a227946d75d5dfe8fe","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        db.purge_deleted_rows(ctxt, age_in_days)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @args(\u0027--max_rows\u0027, dest\u003d\u0027max_rows\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":250,"context_line":"          help\u003d\u0027Maximum number of deleted rows to archive\u0027)"},{"line_number":251,"context_line":"    @args(\u0027--last_updated\u0027, dest\u003d\u0027last_updated\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":252,"context_line":"          help\u003d\u0027Integer value of number of days. \u0027"},{"line_number":253,"context_line":"          \u0027Rows older than last_updated number of days will be deleted.\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_dd0910de","line":250,"in_reply_to":"da86d52c_c7893f27","updated":"2015-02-19 17:11:53.000000000","message":"Good catch, I\u0027ll do it. Thanks","commit_id":"c320d15080139446c9a06b6c7d4b976dd8b367f0"}],"cinder/db/api.py":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":912,"context_line":"####################"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"def archive_deleted_rows(context, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":915,"context_line":"    \"\"\"Move up to max_rows rows from production tables to corresponding shadow"},{"line_number":916,"context_line":"    tables."},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"    :returns: number of rows archived"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_e387c90d","line":915,"updated":"2015-01-28 14:48:42.000000000","message":"Same two comments as on cinder/manage/cmd.py","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"88583a2b813ced933addc08f46169814e3d8e373","unresolved":false,"context_lines":[{"line_number":912,"context_line":"####################"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"def archive_deleted_rows(context, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":915,"context_line":"    \"\"\"Move up to max_rows rows from production tables to corresponding shadow"},{"line_number":916,"context_line":"    tables."},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"    :returns: number of rows archived"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_bec84323","line":915,"in_reply_to":"fa81d914_e387c90d","updated":"2015-02-03 16:46:08.000000000","message":"Unchanged in Patch set 10","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b3492178993ec46118e13be46920d70dd522e272","unresolved":false,"context_lines":[{"line_number":912,"context_line":"####################"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"def archive_deleted_rows(context, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":915,"context_line":"    \"\"\"Move up to max_rows rows from production tables to corresponding shadow"},{"line_number":916,"context_line":"    tables."},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"    :returns: number of rows archived"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_84e6ceb2","line":915,"updated":"2015-02-03 17:32:44.000000000","message":"Move up to max_rows rows older than last_updated number of days..","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7dc9f788f896a488465792a64b91141196bfa945","unresolved":false,"context_lines":[{"line_number":912,"context_line":"####################"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"def archive_deleted_rows(context, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":915,"context_line":"    \"\"\"Move up to max_rows rows from production tables to corresponding shadow"},{"line_number":916,"context_line":"    tables."},{"line_number":917,"context_line":""},{"line_number":918,"context_line":"    :returns: number of rows archived"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_108858e6","line":915,"in_reply_to":"da86d52c_84e6ceb2","updated":"2015-02-03 18:51:43.000000000","message":"Done","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"}],"cinder/db/migration.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"feba26c2ef6c3199fd0f9ec5f358dbc640a4526d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        shadow_table.create()"},{"line_number":83,"context_line":"    except Exception:"},{"line_number":84,"context_line":"        LOG.info(repr(shadow_table))"},{"line_number":85,"context_line":"        LOG.exception(_LE(\u0027Exception while creating table.\u0027))"},{"line_number":86,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba7be1f8_0e29969a","line":85,"updated":"2015-02-26 18:46:57.000000000","message":"Can we include the table name here?  I think that would be helpful.","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"71f00a9ae5b8c4944439deed018f8b4c5260a682","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        shadow_table.create()"},{"line_number":83,"context_line":"    except Exception:"},{"line_number":84,"context_line":"        LOG.info(repr(shadow_table))"},{"line_number":85,"context_line":"        LOG.exception(_LE(\u0027Exception while creating table.\u0027))"},{"line_number":86,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba7be1f8_4e08e728","line":85,"in_reply_to":"ba7be1f8_0e29969a","updated":"2015-02-26 20:50:08.000000000","message":"Done","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e7b904c34ae3c38f8cab0133bfa5606749e0be6e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    columns \u003d []"},{"line_number":75,"context_line":"    for column in table.columns:"},{"line_number":76,"context_line":"        column_copy \u003d column.copy()"},{"line_number":77,"context_line":"        # NOTE(e0ne): Need to screate new sequence for PostgreSQL because"},{"line_number":78,"context_line":"        # column.copy do not create it for a new column."},{"line_number":79,"context_line":"        # No need to set both autoincrement and a sequence."},{"line_number":80,"context_line":"        if meta.bind.name.startswith(\u0027postgres\u0027):"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a80dd14_7c171d52","line":77,"updated":"2015-03-04 09:44:23.000000000","message":"screate?","commit_id":"83a6e786187994ec2b3229a5bd2836adbcc7238d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"bdc960423047863f36728a0426039c92e2fbb29f","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    columns \u003d []"},{"line_number":75,"context_line":"    for column in table.columns:"},{"line_number":76,"context_line":"        column_copy \u003d column.copy()"},{"line_number":77,"context_line":"        # NOTE(e0ne): Need to screate new sequence for PostgreSQL because"},{"line_number":78,"context_line":"        # column.copy do not create it for a new column."},{"line_number":79,"context_line":"        # No need to set both autoincrement and a sequence."},{"line_number":80,"context_line":"        if meta.bind.name.startswith(\u0027postgres\u0027):"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a80dd14_a1a18447","line":77,"in_reply_to":"9a80dd14_7c171d52","updated":"2015-03-10 10:57:12.000000000","message":"Done","commit_id":"83a6e786187994ec2b3229a5bd2836adbcc7238d"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":3252,"context_line":"@require_admin_context"},{"line_number":3253,"context_line":"def archive_deleted_rows_for_table(context, tablename, max_rows\u003dNone,"},{"line_number":3254,"context_line":"                                   last_updated\u003dNone):"},{"line_number":3255,"context_line":"    \"\"\"Move up to max_rows rows from one tables to the corresponding"},{"line_number":3256,"context_line":"    shadow table."},{"line_number":3257,"context_line":""},{"line_number":3258,"context_line":"    :returns: number of rows archive"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_63aaf971","line":3255,"updated":"2015-01-28 14:48:42.000000000","message":"Same comment","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"88583a2b813ced933addc08f46169814e3d8e373","unresolved":false,"context_lines":[{"line_number":3252,"context_line":"@require_admin_context"},{"line_number":3253,"context_line":"def archive_deleted_rows_for_table(context, tablename, max_rows\u003dNone,"},{"line_number":3254,"context_line":"                                   last_updated\u003dNone):"},{"line_number":3255,"context_line":"    \"\"\"Move up to max_rows rows from one tables to the corresponding"},{"line_number":3256,"context_line":"    shadow table."},{"line_number":3257,"context_line":""},{"line_number":3258,"context_line":"    :returns: number of rows archive"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_3edc53e4","line":3255,"in_reply_to":"fa81d914_63aaf971","updated":"2015-02-03 16:46:08.000000000","message":"Unchanged in PS10","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":3296,"context_line":"            current \u003d datetime.datetime.utcnow()"},{"line_number":3297,"context_line":"            age \u003d current - datetime.timedelta(days\u003dlast_updated)"},{"line_number":3298,"context_line":"            query \u003d select([table],"},{"line_number":3299,"context_line":"                           table.c.deleted \u003e age)"},{"line_number":3300,"context_line":"        rows \u003d conn.execute(query).fetchall()"},{"line_number":3301,"context_line":"        if rows:"},{"line_number":3302,"context_line":"            insert_statement \u003d shadow_table.insert()"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_06af8be4","line":3299,"updated":"2015-01-28 14:48:42.000000000","message":"do you mean table.c.deleted_at?","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"763f204a39caac49f7ff2e7667f29b8f88d4db95","unresolved":false,"context_lines":[{"line_number":3296,"context_line":"            current \u003d datetime.datetime.utcnow()"},{"line_number":3297,"context_line":"            age \u003d current - datetime.timedelta(days\u003dlast_updated)"},{"line_number":3298,"context_line":"            query \u003d select([table],"},{"line_number":3299,"context_line":"                           table.c.deleted \u003e age)"},{"line_number":3300,"context_line":"        rows \u003d conn.execute(query).fetchall()"},{"line_number":3301,"context_line":"        if rows:"},{"line_number":3302,"context_line":"            insert_statement \u003d shadow_table.insert()"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_227c7b20","line":3299,"in_reply_to":"fa81d914_06af8be4","updated":"2015-02-02 13:06:21.000000000","message":"Done","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"88583a2b813ced933addc08f46169814e3d8e373","unresolved":false,"context_lines":[{"line_number":3310,"context_line":""},{"line_number":3311,"context_line":"@require_admin_context"},{"line_number":3312,"context_line":"def archive_deleted_rows(context, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":3313,"context_line":"    \"\"\"Move up to max_rows rows from production tables to the corresponding"},{"line_number":3314,"context_line":"    shadow tables."},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"    :returns: Number of rows archived."}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_a15e6410","line":3313,"updated":"2015-02-03 16:46:08.000000000","message":"Unchanged in PS10. Sorry, should have pointed it out here as well","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":3317,"context_line":"    \"\"\""},{"line_number":3318,"context_line":"    # The context argument is only used for the decorator."},{"line_number":3319,"context_line":"    if max_rows is None:"},{"line_number":3320,"context_line":"        max_rows \u003d 5000"},{"line_number":3321,"context_line":"    tablenames \u003d []"},{"line_number":3322,"context_line":"    for model_class in models.__dict__.itervalues():"},{"line_number":3323,"context_line":"        if hasattr(model_class, \"__tablename__\"):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_6374b9fd","line":3320,"updated":"2015-01-28 14:48:42.000000000","message":"I think this constant value of 5000 needs a mention in the docstring of archive_deleted_tables method, and should be included in docs as well","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"763f204a39caac49f7ff2e7667f29b8f88d4db95","unresolved":false,"context_lines":[{"line_number":3317,"context_line":"    \"\"\""},{"line_number":3318,"context_line":"    # The context argument is only used for the decorator."},{"line_number":3319,"context_line":"    if max_rows is None:"},{"line_number":3320,"context_line":"        max_rows \u003d 5000"},{"line_number":3321,"context_line":"    tablenames \u003d []"},{"line_number":3322,"context_line":"    for model_class in models.__dict__.itervalues():"},{"line_number":3323,"context_line":"        if hasattr(model_class, \"__tablename__\"):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_82c1a730","line":3320,"in_reply_to":"fa81d914_6374b9fd","updated":"2015-02-02 13:06:21.000000000","message":"Done","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b3492178993ec46118e13be46920d70dd522e272","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"    # TODO(e0ne): It would be better to introspect the actual default value"},{"line_number":3238,"context_line":"    # from the column, but I don\u0027t see a way to do that in the low-level APIs"},{"line_number":3239,"context_line":"    # of SQLAlchemy 0.7.  0.8 has better introspection APIs, which we should"},{"line_number":3240,"context_line":"    # use when Nova is ready to require 0.8."},{"line_number":3241,"context_line":"    deleted_column_type \u003d table.c.deleted.type"},{"line_number":3242,"context_line":"    if isinstance(deleted_column_type, sqlalchemy.Integer):"},{"line_number":3243,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_3542ae3e","line":3240,"updated":"2015-02-03 17:32:44.000000000","message":"Nova?","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7dc9f788f896a488465792a64b91141196bfa945","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"    # TODO(e0ne): It would be better to introspect the actual default value"},{"line_number":3238,"context_line":"    # from the column, but I don\u0027t see a way to do that in the low-level APIs"},{"line_number":3239,"context_line":"    # of SQLAlchemy 0.7.  0.8 has better introspection APIs, which we should"},{"line_number":3240,"context_line":"    # use when Nova is ready to require 0.8."},{"line_number":3241,"context_line":"    deleted_column_type \u003d table.c.deleted.type"},{"line_number":3242,"context_line":"    if isinstance(deleted_column_type, sqlalchemy.Integer):"},{"line_number":3243,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_d0cb201c","line":3240,"in_reply_to":"da86d52c_3542ae3e","updated":"2015-02-03 18:51:43.000000000","message":"Done","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b3492178993ec46118e13be46920d70dd522e272","unresolved":false,"context_lines":[{"line_number":3252,"context_line":"@require_admin_context"},{"line_number":3253,"context_line":"def archive_deleted_rows_for_table(context, tablename, max_rows\u003dNone,"},{"line_number":3254,"context_line":"                                   last_updated\u003dNone):"},{"line_number":3255,"context_line":"    \"\"\"Move up to max_rows rows from one tables to the corresponding"},{"line_number":3256,"context_line":"    shadow table."},{"line_number":3257,"context_line":""},{"line_number":3258,"context_line":"    :returns: number of rows archive"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_af4e4b6d","line":3255,"updated":"2015-02-03 17:32:44.000000000","message":"with last updated time greater than last_updated...","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b3492178993ec46118e13be46920d70dd522e272","unresolved":false,"context_lines":[{"line_number":3259,"context_line":"    \"\"\""},{"line_number":3260,"context_line":"    # The context argument is only used for the decorator."},{"line_number":3261,"context_line":"    if max_rows is None:"},{"line_number":3262,"context_line":"        max_rows \u003d 5000"},{"line_number":3263,"context_line":"    engine \u003d get_engine()"},{"line_number":3264,"context_line":"    conn \u003d engine.connect()"},{"line_number":3265,"context_line":"    metadata \u003d sqlalchemy.MetaData()"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_ef5923ff","line":3262,"updated":"2015-02-03 17:32:44.000000000","message":"Consider using a constant for default max rows; it\u0027s used in another function as well.","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7dc9f788f896a488465792a64b91141196bfa945","unresolved":false,"context_lines":[{"line_number":3259,"context_line":"    \"\"\""},{"line_number":3260,"context_line":"    # The context argument is only used for the decorator."},{"line_number":3261,"context_line":"    if max_rows is None:"},{"line_number":3262,"context_line":"        max_rows \u003d 5000"},{"line_number":3263,"context_line":"    engine \u003d get_engine()"},{"line_number":3264,"context_line":"    conn \u003d engine.connect()"},{"line_number":3265,"context_line":"    metadata \u003d sqlalchemy.MetaData()"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_30b1dc8f","line":3262,"in_reply_to":"da86d52c_ef5923ff","updated":"2015-02-03 18:51:43.000000000","message":"Done","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b3492178993ec46118e13be46920d70dd522e272","unresolved":false,"context_lines":[{"line_number":3271,"context_line":"    try:"},{"line_number":3272,"context_line":"        shadow_table \u003d schema.Table(shadow_tablename, metadata, autoload\u003dTrue)"},{"line_number":3273,"context_line":"    except exc.NoSuchTableError:"},{"line_number":3274,"context_line":"        # No corresponding shadow table; skip it."},{"line_number":3275,"context_line":"        return rows_archived"},{"line_number":3276,"context_line":"    # Group the insert and delete in a transaction."},{"line_number":3277,"context_line":"    with conn.begin():"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_6f1b731b","line":3274,"updated":"2015-02-03 17:32:44.000000000","message":"Do we need to log this?","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7dc9f788f896a488465792a64b91141196bfa945","unresolved":false,"context_lines":[{"line_number":3271,"context_line":"    try:"},{"line_number":3272,"context_line":"        shadow_table \u003d schema.Table(shadow_tablename, metadata, autoload\u003dTrue)"},{"line_number":3273,"context_line":"    except exc.NoSuchTableError:"},{"line_number":3274,"context_line":"        # No corresponding shadow table; skip it."},{"line_number":3275,"context_line":"        return rows_archived"},{"line_number":3276,"context_line":"    # Group the insert and delete in a transaction."},{"line_number":3277,"context_line":"    with conn.begin():"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_c451a10f","line":3274,"in_reply_to":"da86d52c_6f1b731b","updated":"2015-02-03 18:51:43.000000000","message":"Done","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"b3492178993ec46118e13be46920d70dd522e272","unresolved":false,"context_lines":[{"line_number":3278,"context_line":"        # TODO(e0ne): It would be more efficient to insert(select) and then"},{"line_number":3279,"context_line":"        # delete(same select) without ever returning the selected rows back to"},{"line_number":3280,"context_line":"        # Python.  sqlalchemy does not support that directly, but we have"},{"line_number":3281,"context_line":"        # nova.db.sqlalchemy.utils.InsertFromSelect for the insert side.  We"},{"line_number":3282,"context_line":"        # need a corresponding function for the delete side."},{"line_number":3283,"context_line":"        try:"},{"line_number":3284,"context_line":"            column \u003d table.c.id"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_9547da4a","line":3281,"updated":"2015-02-03 17:32:44.000000000","message":"nova?","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7dc9f788f896a488465792a64b91141196bfa945","unresolved":false,"context_lines":[{"line_number":3278,"context_line":"        # TODO(e0ne): It would be more efficient to insert(select) and then"},{"line_number":3279,"context_line":"        # delete(same select) without ever returning the selected rows back to"},{"line_number":3280,"context_line":"        # Python.  sqlalchemy does not support that directly, but we have"},{"line_number":3281,"context_line":"        # nova.db.sqlalchemy.utils.InsertFromSelect for the insert side.  We"},{"line_number":3282,"context_line":"        # need a corresponding function for the delete side."},{"line_number":3283,"context_line":"        try:"},{"line_number":3284,"context_line":"            column \u003d table.c.id"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_70ab541d","line":3281,"in_reply_to":"da86d52c_9547da4a","updated":"2015-02-03 18:51:43.000000000","message":"Done","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"54095d9c4054bffc401e57a697e302daca924b85","unresolved":false,"context_lines":[{"line_number":3288,"context_line":"        except AttributeError:"},{"line_number":3289,"context_line":"            # We have one table (encryption) where the key is called"},{"line_number":3290,"context_line":"            # \"encryption_id\" rather than \"id\""},{"line_number":3291,"context_line":"            column \u003d table.c.encryption_id"},{"line_number":3292,"context_line":"            column_name \u003d \"encryption_id\""},{"line_number":3293,"context_line":"        if not last_updated:"},{"line_number":3294,"context_line":"            query \u003d select([table],"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_e9167654","line":3291,"updated":"2015-02-03 21:08:07.000000000","message":"Should this also have a try..except?\nIf a new key were added that was neither \u0027id\u0027 nor \u0027encryption_id\u0027, it would throw AttributeError again, right?","commit_id":"0843bdb26cf979c68d7fbc04551714062ee5f931"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"0168e6840d3e6ebb23c5c1e3190f2c12eea7da12","unresolved":false,"context_lines":[{"line_number":3288,"context_line":"        except AttributeError:"},{"line_number":3289,"context_line":"            # We have one table (encryption) where the key is called"},{"line_number":3290,"context_line":"            # \"encryption_id\" rather than \"id\""},{"line_number":3291,"context_line":"            column \u003d table.c.encryption_id"},{"line_number":3292,"context_line":"            column_name \u003d \"encryption_id\""},{"line_number":3293,"context_line":"        if not last_updated:"},{"line_number":3294,"context_line":"            query \u003d select([table],"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_3fdc3f73","line":3291,"in_reply_to":"da86d52c_e9167654","updated":"2015-02-03 22:14:43.000000000","message":"I\u0027m not agree that we need to add try-except here. If we won\u0027t add it we\u0027ll got a failure in a future right after adding such changes and be able to fix it before changes will be done","commit_id":"0843bdb26cf979c68d7fbc04551714062ee5f931"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c8b1b314e43a3a3104169039d9a0151c6dff2f40","unresolved":false,"context_lines":[{"line_number":3375,"context_line":"        if hasattr(model_class, \"__tablename__\"):"},{"line_number":3376,"context_line":"            tablenames.append(model_class.__tablename__)"},{"line_number":3377,"context_line":"    rows_archived \u003d 0"},{"line_number":3378,"context_line":"    max_rows_archived \u003d max_rows - rows_archived"},{"line_number":3379,"context_line":"    for tablename in tablenames:"},{"line_number":3380,"context_line":"        rows_archived +\u003d archive_deleted_rows_for_table(context, tablename,"},{"line_number":3381,"context_line":"                                                        max_rows_archived,"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_c862ebac","line":3378,"updated":"2015-02-09 01:18:30.000000000","message":"This will always be \"value - 0\" at this point. Just use max_rows below.","commit_id":"ad574efa41f4de4a6e38a6fe61a497b269e960b8"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"247a4c120194ab7addd0b479944981bbf1da3109","unresolved":false,"context_lines":[{"line_number":3375,"context_line":"        if hasattr(model_class, \"__tablename__\"):"},{"line_number":3376,"context_line":"            tablenames.append(model_class.__tablename__)"},{"line_number":3377,"context_line":"    rows_archived \u003d 0"},{"line_number":3378,"context_line":"    max_rows_archived \u003d max_rows - rows_archived"},{"line_number":3379,"context_line":"    for tablename in tablenames:"},{"line_number":3380,"context_line":"        rows_archived +\u003d archive_deleted_rows_for_table(context, tablename,"},{"line_number":3381,"context_line":"                                                        max_rows_archived,"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_18791f2f","line":3378,"in_reply_to":"da86d52c_c862ebac","updated":"2015-02-18 20:13:44.000000000","message":"Done","commit_id":"ad574efa41f4de4a6e38a6fe61a497b269e960b8"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"5fa8985a99a4a759006854cf0d2020dae7f3b256","unresolved":false,"context_lines":[{"line_number":3301,"context_line":""},{"line_number":3302,"context_line":""},{"line_number":3303,"context_line":"@require_admin_context"},{"line_number":3304,"context_line":"def archive_deleted_rows_for_table(context, tablename, max_rows\u003dNone,"},{"line_number":3305,"context_line":"                                   last_updated\u003dNone):"},{"line_number":3306,"context_line":"    \"\"\"Achive deleted rows for table."},{"line_number":3307,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_871d87c0","line":3304,"updated":"2015-02-19 16:35:36.000000000","message":"Why not default the max_rows to the default value of MAX_DELETED_ROWS_TO_ARCHIVE instead of setting it to None, and then checking for None?","commit_id":"c320d15080139446c9a06b6c7d4b976dd8b367f0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"292ee1b21409a672cc25f7a227946d75d5dfe8fe","unresolved":false,"context_lines":[{"line_number":3301,"context_line":""},{"line_number":3302,"context_line":""},{"line_number":3303,"context_line":"@require_admin_context"},{"line_number":3304,"context_line":"def archive_deleted_rows_for_table(context, tablename, max_rows\u003dNone,"},{"line_number":3305,"context_line":"                                   last_updated\u003dNone):"},{"line_number":3306,"context_line":"    \"\"\"Achive deleted rows for table."},{"line_number":3307,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_7d52e4de","line":3304,"in_reply_to":"da86d52c_871d87c0","updated":"2015-02-19 17:11:53.000000000","message":"Done","commit_id":"c320d15080139446c9a06b6c7d4b976dd8b367f0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"09cffbacecf20cc102c39352b0391a1e5a4a2dd1","unresolved":false,"context_lines":[{"line_number":3358,"context_line":"            result \u003d conn.execute(delete_statement)"},{"line_number":3359,"context_line":"            rows_archived \u003d result.rowcount"},{"line_number":3360,"context_line":"            LOG.info(_LI(\"Archived %(row)d rows from table\u003d%(table)s\"),"},{"line_number":3361,"context_line":"                     {\u0027row\u0027: rows_archived, \u0027table\u0027: tablename})"},{"line_number":3362,"context_line":"    return rows_archived"},{"line_number":3363,"context_line":""},{"line_number":3364,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_cf841ad5","line":3361,"updated":"2015-02-18 21:01:24.000000000","message":"Missed that. Good catch!","commit_id":"c320d15080139446c9a06b6c7d4b976dd8b367f0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"0cb2c0dd4d2cedc5d1134429cb4d88db9e1d2ef8","unresolved":false,"context_lines":[{"line_number":3358,"context_line":"            result \u003d conn.execute(delete_statement)"},{"line_number":3359,"context_line":"            rows_archived \u003d result.rowcount"},{"line_number":3360,"context_line":"            LOG.info(_LI(\"Archived %(row)d rows from table\u003d%(table)s\"),"},{"line_number":3361,"context_line":"                     {\u0027row\u0027: rows_archived, \u0027table\u0027: tablename})"},{"line_number":3362,"context_line":"    return rows_archived"},{"line_number":3363,"context_line":""},{"line_number":3364,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_2f4a16ad","line":3361,"in_reply_to":"da86d52c_cf841ad5","updated":"2015-02-18 21:02:39.000000000","message":"Thanks for review!","commit_id":"c320d15080139446c9a06b6c7d4b976dd8b367f0"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"5fa8985a99a4a759006854cf0d2020dae7f3b256","unresolved":false,"context_lines":[{"line_number":3363,"context_line":""},{"line_number":3364,"context_line":""},{"line_number":3365,"context_line":"@require_admin_context"},{"line_number":3366,"context_line":"def archive_deleted_rows(context, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":3367,"context_line":"    \"\"\"Move up to max_rows rows from production tables to the corresponding"},{"line_number":3368,"context_line":"    shadow tables."},{"line_number":3369,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_67cdf35c","line":3366,"updated":"2015-02-19 16:35:36.000000000","message":"why not default the max_rows to MAX_DELETED_ROWS_TO_ARCHIVE instead of None?","commit_id":"c320d15080139446c9a06b6c7d4b976dd8b367f0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"292ee1b21409a672cc25f7a227946d75d5dfe8fe","unresolved":false,"context_lines":[{"line_number":3363,"context_line":""},{"line_number":3364,"context_line":""},{"line_number":3365,"context_line":"@require_admin_context"},{"line_number":3366,"context_line":"def archive_deleted_rows(context, max_rows\u003dNone, last_updated\u003dNone):"},{"line_number":3367,"context_line":"    \"\"\"Move up to max_rows rows from production tables to the corresponding"},{"line_number":3368,"context_line":"    shadow tables."},{"line_number":3369,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_1d59e8fc","line":3366,"in_reply_to":"da86d52c_67cdf35c","updated":"2015-02-19 17:11:53.000000000","message":"Done","commit_id":"c320d15080139446c9a06b6c7d4b976dd8b367f0"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"feba26c2ef6c3199fd0f9ec5f358dbc640a4526d","unresolved":false,"context_lines":[{"line_number":3324,"context_line":"        shadow_table \u003d Table(shadow_tablename, metadata, autoload\u003dTrue)"},{"line_number":3325,"context_line":"    except exc.NoSuchTableError:"},{"line_number":3326,"context_line":"        # No corresponding shadow table; skip it."},{"line_number":3327,"context_line":"        LOG.debug(\u0027No corresponding shadow table for: %s\u0027, tablename)"},{"line_number":3328,"context_line":"        return rows_archived"},{"line_number":3329,"context_line":"    # Group the insert and delete in a transaction."},{"line_number":3330,"context_line":"    with conn.begin():"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba7be1f8_e9499c60","line":3327,"updated":"2015-02-26 18:46:57.000000000","message":"This seems like it should be a LOG.warning.","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"71f00a9ae5b8c4944439deed018f8b4c5260a682","unresolved":false,"context_lines":[{"line_number":3324,"context_line":"        shadow_table \u003d Table(shadow_tablename, metadata, autoload\u003dTrue)"},{"line_number":3325,"context_line":"    except exc.NoSuchTableError:"},{"line_number":3326,"context_line":"        # No corresponding shadow table; skip it."},{"line_number":3327,"context_line":"        LOG.debug(\u0027No corresponding shadow table for: %s\u0027, tablename)"},{"line_number":3328,"context_line":"        return rows_archived"},{"line_number":3329,"context_line":"    # Group the insert and delete in a transaction."},{"line_number":3330,"context_line":"    with conn.begin():"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba7be1f8_ee5d1b17","line":3327,"in_reply_to":"ba7be1f8_e9499c60","updated":"2015-02-26 20:50:08.000000000","message":"Done","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"feba26c2ef6c3199fd0f9ec5f358dbc640a4526d","unresolved":false,"context_lines":[{"line_number":3341,"context_line":"            column_name \u003d \"encryption_id\""},{"line_number":3342,"context_line":"        if not last_updated:"},{"line_number":3343,"context_line":"            query \u003d select([table],"},{"line_number":3344,"context_line":"                           table.c.deleted !\u003d default_deleted_value).\\"},{"line_number":3345,"context_line":"                order_by(column).limit(max_rows)"},{"line_number":3346,"context_line":"        else:"},{"line_number":3347,"context_line":"            current \u003d datetime.utcnow()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba7be1f8_c9acd8ef","line":3344,"updated":"2015-02-26 18:46:57.000000000","message":"Can we do this using () instead of \\ please?","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"71f00a9ae5b8c4944439deed018f8b4c5260a682","unresolved":false,"context_lines":[{"line_number":3341,"context_line":"            column_name \u003d \"encryption_id\""},{"line_number":3342,"context_line":"        if not last_updated:"},{"line_number":3343,"context_line":"            query \u003d select([table],"},{"line_number":3344,"context_line":"                           table.c.deleted !\u003d default_deleted_value).\\"},{"line_number":3345,"context_line":"                order_by(column).limit(max_rows)"},{"line_number":3346,"context_line":"        else:"},{"line_number":3347,"context_line":"            current \u003d datetime.utcnow()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba7be1f8_ee18bb77","line":3344,"in_reply_to":"ba7be1f8_c9acd8ef","updated":"2015-02-26 20:50:08.000000000","message":"Sure. Done","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e7b904c34ae3c38f8cab0133bfa5606749e0be6e","unresolved":false,"context_lines":[{"line_number":3458,"context_line":"        shadow_table \u003d Table(shadow_tablename, metadata, autoload\u003dTrue)"},{"line_number":3459,"context_line":"    except exc.NoSuchTableError:"},{"line_number":3460,"context_line":"        # No corresponding shadow table; skip it."},{"line_number":3461,"context_line":"        LOG.warn(_LW(\u0027No corresponding shadow table for: %s\u0027), tablename)"},{"line_number":3462,"context_line":"        return rows_archived"},{"line_number":3463,"context_line":"    # Group the insert and delete in a transaction."},{"line_number":3464,"context_line":"    with conn.begin():"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a80dd14_1048c55a","line":3461,"updated":"2015-03-04 09:44:23.000000000","message":"Period missing.","commit_id":"83a6e786187994ec2b3229a5bd2836adbcc7238d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"bdc960423047863f36728a0426039c92e2fbb29f","unresolved":false,"context_lines":[{"line_number":3458,"context_line":"        shadow_table \u003d Table(shadow_tablename, metadata, autoload\u003dTrue)"},{"line_number":3459,"context_line":"    except exc.NoSuchTableError:"},{"line_number":3460,"context_line":"        # No corresponding shadow table; skip it."},{"line_number":3461,"context_line":"        LOG.warn(_LW(\u0027No corresponding shadow table for: %s\u0027), tablename)"},{"line_number":3462,"context_line":"        return rows_archived"},{"line_number":3463,"context_line":"    # Group the insert and delete in a transaction."},{"line_number":3464,"context_line":"    with conn.begin():"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a80dd14_a1b8a475","line":3461,"in_reply_to":"9a80dd14_1048c55a","updated":"2015-03-10 10:57:12.000000000","message":"Done","commit_id":"83a6e786187994ec2b3229a5bd2836adbcc7238d"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e7b904c34ae3c38f8cab0133bfa5606749e0be6e","unresolved":false,"context_lines":[{"line_number":3491,"context_line":"            delete_statement \u003d table.delete(column.in_(keys))"},{"line_number":3492,"context_line":"            result \u003d conn.execute(delete_statement)"},{"line_number":3493,"context_line":"            rows_archived \u003d result.rowcount"},{"line_number":3494,"context_line":"            LOG.info(_LI(\"Archived %(row)d rows from table\u003d%(table)s\"),"},{"line_number":3495,"context_line":"                     {\u0027row\u0027: rows_archived, \u0027table\u0027: tablename})"},{"line_number":3496,"context_line":"    return rows_archived"},{"line_number":3497,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a80dd14_706e61cb","line":3494,"updated":"2015-03-04 09:44:23.000000000","message":"Same comment.","commit_id":"83a6e786187994ec2b3229a5bd2836adbcc7238d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"bdc960423047863f36728a0426039c92e2fbb29f","unresolved":false,"context_lines":[{"line_number":3491,"context_line":"            delete_statement \u003d table.delete(column.in_(keys))"},{"line_number":3492,"context_line":"            result \u003d conn.execute(delete_statement)"},{"line_number":3493,"context_line":"            rows_archived \u003d result.rowcount"},{"line_number":3494,"context_line":"            LOG.info(_LI(\"Archived %(row)d rows from table\u003d%(table)s\"),"},{"line_number":3495,"context_line":"                     {\u0027row\u0027: rows_archived, \u0027table\u0027: tablename})"},{"line_number":3496,"context_line":"    return rows_archived"},{"line_number":3497,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a80dd14_c1b2f892","line":3494,"in_reply_to":"9a80dd14_706e61cb","updated":"2015-03-10 10:57:12.000000000","message":"Done","commit_id":"83a6e786187994ec2b3229a5bd2836adbcc7238d"}],"cinder/db/sqlalchemy/migrate_repo/versions/037_add_shadow_tables.py":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            shadow_table.create()"},{"line_number":51,"context_line":"        except Exception:"},{"line_number":52,"context_line":"            LOG.info(repr(shadow_table))"},{"line_number":53,"context_line":"            LOG.exception(\u0027Exception while creating table.\u0027)"},{"line_number":54,"context_line":"            raise"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_e646f722","line":53,"updated":"2015-01-28 14:48:42.000000000","message":"Would it be better to combine the two log messages? It would be clearer if we say \"exception while creating foobar table\u0027","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            shadow_table.drop()"},{"line_number":71,"context_line":"        except Exception:"},{"line_number":72,"context_line":"            LOG.error(\"table \u0027%s\u0027 not dropped\" % shadow_table_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_466c239d","line":72,"updated":"2015-01-28 14:48:42.000000000","message":"Do we need _LE marker here? Also, \u0027t\u0027 of \u0027table\u0027 can be capitalized","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"763f204a39caac49f7ff2e7667f29b8f88d4db95","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            shadow_table.drop()"},{"line_number":71,"context_line":"        except Exception:"},{"line_number":72,"context_line":"            LOG.error(\"table \u0027%s\u0027 not dropped\" % shadow_table_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_a22b0bea","line":72,"in_reply_to":"fa81d914_466c239d","updated":"2015-02-02 13:06:21.000000000","message":"Done","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"9f83a9d6d8324beacbf84a1339365a83004e572b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        except Exception:"},{"line_number":53,"context_line":"            LOG.info(repr(shadow_table))"},{"line_number":54,"context_line":"            LOG.exception(_LE(\u0027Exception while creating table.\u0027))"},{"line_number":55,"context_line":"            raise"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba7be1f8_99ce7959","line":55,"updated":"2015-02-20 23:21:52.000000000","message":"Is there anyway to make this into a utility function that others can reuse later on?   Especially since there are some gotchas for the BigInteger type columns.","commit_id":"4ad4239d356602c65559ec06a238d1d20c886322"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"12e292fdc29d050de2bc28b203d83732551513f0","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        except Exception:"},{"line_number":53,"context_line":"            LOG.info(repr(shadow_table))"},{"line_number":54,"context_line":"            LOG.exception(_LE(\u0027Exception while creating table.\u0027))"},{"line_number":55,"context_line":"            raise"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba7be1f8_dc1a9f6d","line":55,"in_reply_to":"ba7be1f8_99ce7959","updated":"2015-02-20 23:36:02.000000000","message":"Sure, I\u0027ll do it. BTW, this code for BigInteger will be removed in the next patch because it\u0027s not related to cinder","commit_id":"4ad4239d356602c65559ec06a238d1d20c886322"}],"cinder/tests/test_db_api.py":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_config import cfg"},{"line_number":20,"context_line":"from oslo_utils import uuidutils"},{"line_number":21,"context_line":"import sqlalchemy"},{"line_number":22,"context_line":"from sqlalchemy import schema"},{"line_number":23,"context_line":"from sqlalchemy.sql import expression"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_461a6318","line":21,"updated":"2015-01-28 14:48:42.000000000","message":"why not \n\n from sqlalchemy import MetaData\n\n?","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"88583a2b813ced933addc08f46169814e3d8e373","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_config import cfg"},{"line_number":20,"context_line":"from oslo_utils import uuidutils"},{"line_number":21,"context_line":"import sqlalchemy"},{"line_number":22,"context_line":"from sqlalchemy import schema"},{"line_number":23,"context_line":"from sqlalchemy.sql import expression"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_9e8fffcb","line":21,"in_reply_to":"da86d52c_423c0f30","updated":"2015-02-03 16:46:08.000000000","message":"OK, thanks","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"763f204a39caac49f7ff2e7667f29b8f88d4db95","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_config import cfg"},{"line_number":20,"context_line":"from oslo_utils import uuidutils"},{"line_number":21,"context_line":"import sqlalchemy"},{"line_number":22,"context_line":"from sqlalchemy import schema"},{"line_number":23,"context_line":"from sqlalchemy.sql import expression"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_423c0f30","line":21,"in_reply_to":"fa81d914_461a6318","updated":"2015-02-02 13:06:21.000000000","message":"According to a Hacking rules, we need to import modules, not objects","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"140ce4823efb07b2e50b1c8f342ad674fb24f036","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"            self.shadow_quotas_table.c.id.in_(self.keys))"},{"line_number":1249,"context_line":"        self.conn.execute(delete_statement2)"},{"line_number":1250,"context_line":""},{"line_number":1251,"context_line":"    def test_archive_deleted_rows(self):"},{"line_number":1252,"context_line":"        # Add 6 rows to table"},{"line_number":1253,"context_line":"        for pk in self.keys:"},{"line_number":1254,"context_line":"            insert_statement \u003d self.quotas_table.insert().values(id\u003dpk,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_8688db23","line":1251,"updated":"2015-01-28 14:48:42.000000000","message":"Can\u0027t see tests for last_updated argument","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"763f204a39caac49f7ff2e7667f29b8f88d4db95","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"            self.shadow_quotas_table.c.id.in_(self.keys))"},{"line_number":1249,"context_line":"        self.conn.execute(delete_statement2)"},{"line_number":1250,"context_line":""},{"line_number":1251,"context_line":"    def test_archive_deleted_rows(self):"},{"line_number":1252,"context_line":"        # Add 6 rows to table"},{"line_number":1253,"context_line":"        for pk in self.keys:"},{"line_number":1254,"context_line":"            insert_statement \u003d self.quotas_table.insert().values(id\u003dpk,"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_c268fff7","line":1251,"in_reply_to":"fa81d914_8688db23","updated":"2015-02-02 13:06:21.000000000","message":"Done","commit_id":"b31b7f61b57e3780b8395362051de1f0075e2952"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"4a8f8ebd0ad1fa53e256d9180e117a3d16281326","unresolved":false,"context_lines":[{"line_number":1262,"context_line":"            values(deleted\u003dTrue)"},{"line_number":1263,"context_line":"        self.conn.execute(update_statement)"},{"line_number":1264,"context_line":""},{"line_number":1265,"context_line":"        query1 \u003d expression.select([self.quotas_table]).where("},{"line_number":1266,"context_line":"            self.quotas_table.c.id.in_(self.keys))"},{"line_number":1267,"context_line":"        rows1 \u003d self.conn.execute(query1).fetchall()"},{"line_number":1268,"context_line":"        # Verify we have 6 in main"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_44e856e2","line":1265,"updated":"2015-02-03 16:45:56.000000000","message":"we can pick better names than query1 and query2. Maybe orig_table_query and shadow_table_query?","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7dc9f788f896a488465792a64b91141196bfa945","unresolved":false,"context_lines":[{"line_number":1262,"context_line":"            values(deleted\u003dTrue)"},{"line_number":1263,"context_line":"        self.conn.execute(update_statement)"},{"line_number":1264,"context_line":""},{"line_number":1265,"context_line":"        query1 \u003d expression.select([self.quotas_table]).where("},{"line_number":1266,"context_line":"            self.quotas_table.c.id.in_(self.keys))"},{"line_number":1267,"context_line":"        rows1 \u003d self.conn.execute(query1).fetchall()"},{"line_number":1268,"context_line":"        # Verify we have 6 in main"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_240d1d3f","line":1265,"in_reply_to":"da86d52c_44e856e2","updated":"2015-02-03 18:51:43.000000000","message":"Done","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"4a8f8ebd0ad1fa53e256d9180e117a3d16281326","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        self.assertEqual(2, len(rows9))"},{"line_number":1310,"context_line":"        db.archive_deleted_rows(self.ctxt, last_updated\u003d1)"},{"line_number":1311,"context_line":"        rows10 \u003d self.conn.execute(query3).fetchall()"},{"line_number":1312,"context_line":"        self.assertEqual(0, len(rows10))"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_c42d2648","line":1312,"updated":"2015-02-03 16:45:56.000000000","message":"Can we also add a query and assert to check if rows get moved to the shadow table?\n\nIdeally I would like to see this part of the tests to be as detailed and self-documenting as the first part (max_rows stuff), which I should tell I am happy to see them in such a good detail..","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7dc9f788f896a488465792a64b91141196bfa945","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        self.assertEqual(2, len(rows9))"},{"line_number":1310,"context_line":"        db.archive_deleted_rows(self.ctxt, last_updated\u003d1)"},{"line_number":1311,"context_line":"        rows10 \u003d self.conn.execute(query3).fetchall()"},{"line_number":1312,"context_line":"        self.assertEqual(0, len(rows10))"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_87308be9","line":1312,"in_reply_to":"da86d52c_b075cc99","updated":"2015-02-03 18:51:43.000000000","message":"Done","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"559e92779444e9de5f59c4cf3c758b73f17c847f","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"        self.assertEqual(2, len(rows9))"},{"line_number":1310,"context_line":"        db.archive_deleted_rows(self.ctxt, last_updated\u003d1)"},{"line_number":1311,"context_line":"        rows10 \u003d self.conn.execute(query3).fetchall()"},{"line_number":1312,"context_line":"        self.assertEqual(0, len(rows10))"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_b075cc99","line":1312,"in_reply_to":"da86d52c_c42d2648","updated":"2015-02-03 17:41:03.000000000","message":"Sure, I\u0027ll do it.","commit_id":"a7d096ee85780c06582707a3a60eba7032558d47"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"feba26c2ef6c3199fd0f9ec5f358dbc640a4526d","unresolved":false,"context_lines":[{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"    def tearDown(self):"},{"line_number":1241,"context_line":"        super(ArchiveTestCase, self).tearDown()"},{"line_number":1242,"context_line":"        delete_statement1 \u003d \\"},{"line_number":1243,"context_line":"            self.quotas_table.delete("},{"line_number":1244,"context_line":"                self.quotas_table.c.id.in_(self.keys))"},{"line_number":1245,"context_line":"        self.conn.execute(delete_statement1)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba7be1f8_1a61cca8","line":1242,"updated":"2015-02-26 18:46:57.000000000","message":"Prefer to use () instead of \\","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"71f00a9ae5b8c4944439deed018f8b4c5260a682","unresolved":false,"context_lines":[{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"    def tearDown(self):"},{"line_number":1241,"context_line":"        super(ArchiveTestCase, self).tearDown()"},{"line_number":1242,"context_line":"        delete_statement1 \u003d \\"},{"line_number":1243,"context_line":"            self.quotas_table.delete("},{"line_number":1244,"context_line":"                self.quotas_table.c.id.in_(self.keys))"},{"line_number":1245,"context_line":"        self.conn.execute(delete_statement1)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba7be1f8_ae1b231b","line":1242,"in_reply_to":"ba7be1f8_1a61cca8","updated":"2015-02-26 20:50:08.000000000","message":"Done","commit_id":"186afe7f402c8998368408af5677099b6aecd251"}],"cinder/tests/test_migrations.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"d75539a6b05aff421ae4dc4a7b16c543ae5bcabd","unresolved":false,"context_lines":[{"line_number":777,"context_line":"        metadata.bind \u003d engine"},{"line_number":778,"context_line":"        table_names \u003d metadata.tables.keys()"},{"line_number":779,"context_line":"        for table_name in table_names:"},{"line_number":780,"context_line":"            self.assertFalse(table_name.startswith(\"_shadow\"))"},{"line_number":781,"context_line":""},{"line_number":782,"context_line":"    def _check_040(self, engine, data):"},{"line_number":783,"context_line":"        metadata \u003d sqlalchemy.schema.MetaData()"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa32b979_4ef68d5e","line":780,"updated":"2015-06-28 16:00:17.000000000","message":"Shouldn\u0027t this be shadow_ ?","commit_id":"a91a5df1bf44da90d57fa533da9196552347191a"}],"doc/source/devref/database.rst":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"feba26c2ef6c3199fd0f9ec5f358dbc640a4526d","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Migrations"},{"line_number":59,"context_line":"----------"},{"line_number":60,"context_line":"Adding new tables during the Dabase Migration process requires create a new"},{"line_number":61,"context_line":"shadow table::"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    from cinder.db import migration"}],"source_content_type":"text/x-rst","patch_set":18,"id":"ba7be1f8_1aa46cb8","line":60,"updated":"2015-02-26 18:46:57.000000000","message":"create -\u003e creating","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"71f00a9ae5b8c4944439deed018f8b4c5260a682","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Migrations"},{"line_number":59,"context_line":"----------"},{"line_number":60,"context_line":"Adding new tables during the Dabase Migration process requires create a new"},{"line_number":61,"context_line":"shadow table::"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    from cinder.db import migration"}],"source_content_type":"text/x-rst","patch_set":18,"id":"ba7be1f8_aee243ff","line":60,"in_reply_to":"ba7be1f8_1aa46cb8","updated":"2015-02-26 20:50:08.000000000","message":"Done","commit_id":"186afe7f402c8998368408af5677099b6aecd251"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"a2c2ef690579db711b24c6bf55d3cc039a359de2","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Migrations"},{"line_number":59,"context_line":"----------"},{"line_number":60,"context_line":"Adding new tables during the Dabase Migration process requires creating a new"},{"line_number":61,"context_line":"shadow table::"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    from cinder.db import migration"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a80dd14_0dffd502","line":60,"updated":"2015-03-04 09:37:04.000000000","message":"Dabase -\u003e Database","commit_id":"83a6e786187994ec2b3229a5bd2836adbcc7238d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"bdc960423047863f36728a0426039c92e2fbb29f","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Migrations"},{"line_number":59,"context_line":"----------"},{"line_number":60,"context_line":"Adding new tables during the Dabase Migration process requires creating a new"},{"line_number":61,"context_line":"shadow table::"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    from cinder.db import migration"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a80dd14_e15b7c51","line":60,"in_reply_to":"9a80dd14_0dffd502","updated":"2015-03-10 10:57:12.000000000","message":"Done","commit_id":"83a6e786187994ec2b3229a5bd2836adbcc7238d"}]}
