)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bc265a260c533c73f11c272dae36cb0cd3447e2a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove SoftDeleteMixin from BandwidthUsage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This class is never soft-deleted, so it doesn\u0027t need the mixin."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"It should be OK to remove the columns from the model (by removing the"},{"line_number":12,"context_line":"mixin) because they have not been used for over a cycle (in fact, ever)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba8a016a_0502f66f","line":9,"updated":"2015-11-20 15:25:01.000000000","message":"If this is never soft deleted, how do we ever get rid of it?","commit_id":"aa374f34ca3fd481ee070e718fab941a3ff3f468"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e125a79af9f43faba23b05b2b62e1229dce1abe","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove SoftDeleteMixin from BandwidthUsage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This class is never soft-deleted, so it doesn\u0027t need the mixin."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"It should be OK to remove the columns from the model (by removing the"},{"line_number":12,"context_line":"mixin) because they have not been used for over a cycle (in fact, ever)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba8a016a_c8508561","line":9,"in_reply_to":"ba8a016a_0502f66f","updated":"2015-11-20 15:46:13.000000000","message":"Also, the uuid column in this table is an instance uuid, but there is no foreign key on this table, so when we delete the instance (archive or purge), these are orphaned and just fill up the DB.\n\nThat\u0027s not really a knock on this, but we should step back and figure out if we should soft delete these so they can be archived, or if we should just hard-delete these when hard-deleting instances.","commit_id":"aa374f34ca3fd481ee070e718fab941a3ff3f468"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea194b1d2941dd8b307a993eef2a422e75a3cea7","unresolved":false,"context_lines":[{"line_number":12,"context_line":"mixin) because they have not been used for over a cycle (in fact, ever)."},{"line_number":13,"context_line":"Doing this should result in an automatic schema contraction."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"By the same token, it should be OK to remove shadow_bw_usage_cache as"},{"line_number":16,"context_line":"nothing has ever been soft-deleted so this table should be empty."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ib6011a89f73d401334874d719721e41dc0483dc2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9a8ffd7b_fb242db0","line":15,"updated":"2015-11-24 16:29:40.000000000","message":"Removing the shadow table is going to depend on what we do here with the foreign key and orphaned rows:\n\nhttps://review.openstack.org/#/c/248780/","commit_id":"c6804eab584d7448779e79ddf23d9d3731ee12f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33d1d9b46fc9e4c975ac47caea99ae25aeb12a94","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"By the same token, it should be OK to remove shadow_bw_usage_cache as"},{"line_number":16,"context_line":"nothing has ever been soft-deleted so this table should be empty."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ib6011a89f73d401334874d719721e41dc0483dc2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9a8ffd7b_90ddc072","line":17,"updated":"2015-11-24 16:18:22.000000000","message":"You have a blueprint for this work, right?  Link it here.","commit_id":"c6804eab584d7448779e79ddf23d9d3731ee12f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"69ec5963bcec16d971f51c4a88ba49e43db585f3","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"By the same token, it should be OK to remove shadow_bw_usage_cache as"},{"line_number":16,"context_line":"nothing has ever been soft-deleted so this table should be empty."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ib6011a89f73d401334874d719721e41dc0483dc2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9a8ffd7b_b0f56484","line":17,"in_reply_to":"9a8ffd7b_90ddc072","updated":"2015-11-24 16:22:41.000000000","message":"I guess I was thinking this was part of blueprint no-more-soft-delete but I see that\u0027s already marked as complete.","commit_id":"c6804eab584d7448779e79ddf23d9d3731ee12f2"}],"nova/db/sqlalchemy/migrate_repo/versions/313_drop_shadow_bw_usage_cache.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea194b1d2941dd8b307a993eef2a422e75a3cea7","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    meta.bind \u003d engine"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    table \u003d Table(\"shadow_bw_usage_cache\", meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    for index in table.indexes:"},{"line_number":24,"context_line":"        index.drop()"},{"line_number":25,"context_line":"    table.drop()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_70037c10","line":23,"updated":"2015-11-24 16:29:40.000000000","message":"Why do we need to explicitly drop the indexes?  Also, I\u0027m not sure this table would even have indexes, the shadow tables usually never have constraints or indexes defined on them.","commit_id":"c6804eab584d7448779e79ddf23d9d3731ee12f2"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"19aeb1b7fec4a850b6f2e6a7047d5194ee7ad4fd","unresolved":false,"context_lines":[{"line_number":8233,"context_line":"        tablenames \u003d []"},{"line_number":8234,"context_line":"        for model_class in six.itervalues(models.__dict__):"},{"line_number":8235,"context_line":"            if not (hasattr(model_class, \"__tablename__\") and"},{"line_number":8236,"context_line":"                    hasattr(model_class, \"deleted\")):"},{"line_number":8237,"context_line":"                continue"},{"line_number":8238,"context_line":"            tablenames.append(model_class.__tablename__)"},{"line_number":8239,"context_line":"        tablenames.sort()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_e7c2d233","line":8236,"updated":"2015-11-18 16:45:26.000000000","message":"seem it should be:\n if (hasattr(model_class, \"__tablename__\") and not  hasattr(model_class, \"deleted\"):\n     tablenames.append(model_class.__tablename__)","commit_id":"21f48cc381b0bef59b2b2ddbefca0bda425c7f94"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"781f090a57ffe7bb7d6a82118708938f11a5b8cd","unresolved":false,"context_lines":[{"line_number":8233,"context_line":"        tablenames \u003d []"},{"line_number":8234,"context_line":"        for model_class in six.itervalues(models.__dict__):"},{"line_number":8235,"context_line":"            if not (hasattr(model_class, \"__tablename__\") and"},{"line_number":8236,"context_line":"                    hasattr(model_class, \"deleted\")):"},{"line_number":8237,"context_line":"                continue"},{"line_number":8238,"context_line":"            tablenames.append(model_class.__tablename__)"},{"line_number":8239,"context_line":"        tablenames.sort()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_6d717277","line":8236,"in_reply_to":"ba8a016a_e7c2d233","updated":"2015-11-20 13:27:48.000000000","message":"Hmm, this is definitely wrong, but I think the right answer (matching nova/db/sqlalchemy/api.py) is:\n\n      if (hasattr(model_class, \"__tablename__\")\n            and hasattr(model_class, \"deleted\")):\n        tablenames.append(model_class.__tablename__)\n\nWhat do you think please?","commit_id":"21f48cc381b0bef59b2b2ddbefca0bda425c7f94"}]}
