)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"a8aa658588af75e67b0a97940437befdeed00076","unresolved":false,"context_lines":[{"line_number":12,"context_line":"so that even if the length of volume_type is 256 characters, the"},{"line_number":13,"context_line":"resource column gets some extra space and command does not error out"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"UpgradeImpact"},{"line_number":16,"context_line":"Change-Id: I4ce659f79601445c7666cd505d3c852887aaa7b0"},{"line_number":17,"context_line":"Closes-bug: #1608849"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"5a8bc5a2_c172667c","line":15,"updated":"2016-09-22 14:47:56.000000000","message":"What is the upgrade impact?  I don\u0027t think this flag needs to be here.","commit_id":"e60bebb4088dba8966037d6acd21391fde8f44e3"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"3d70615920f0218edbcdf606554d0eca15d68fb3","unresolved":false,"context_lines":[{"line_number":12,"context_line":"so that even if the length of volume_type is 256 characters, the"},{"line_number":13,"context_line":"resource column gets some extra space and command does not error out"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"UpgradeImpact"},{"line_number":16,"context_line":"Change-Id: I4ce659f79601445c7666cd505d3c852887aaa7b0"},{"line_number":17,"context_line":"Closes-bug: #1608849"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"5a8bc5a2_c12506c3","line":15,"in_reply_to":"5a8bc5a2_c172667c","updated":"2016-09-22 15:04:00.000000000","message":"Release note explains it a little better. If someone is trying to do a live upgrade, then he is supposed to migrate the DB first on a living Cinder deployment. Now the problem is that in MySQL expanding VARCHAR table field from \u003c0;255\u003e length to \u003c256;+inf) is an operation that will copy whole table and lock it for writing during the migration. This isn\u0027t something you want to do on a live deployment.","commit_id":"e60bebb4088dba8966037d6acd21391fde8f44e3"}],"cinder/db/sqlalchemy/migrate_repo/versions/078_update_quota_resource_length.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c852454cdc5d7a9a494b3031570a544403638041","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    quota_class \u003d Table(\u0027quota_classes\u0027, meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    quota_usage \u003d Table(\u0027quota_usages\u0027, meta, autoload\u003dTrue)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    quota.c.resource.alter(String(275))"},{"line_number":26,"context_line":"    quota_class.c.resource.alter(String(275))"},{"line_number":27,"context_line":"    quota_usage.c.resource.alter(String(275))"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_5312a2b5","line":27,"range":{"start_line":25,"start_character":0,"end_line":27,"end_character":45},"updated":"2016-08-26 11:44:42.000000000","message":"Uh, oh, this won\u0027t be an online schema change [1]. We shouldn\u0027t allow such DB migrations.\n\n[1] http://dev.mysql.com/doc/refman/5.7/en/innodb-create-index-overview.html#innodb-online-ddl-column-properties","commit_id":"ef91e054df835f391e8902ca9321a0751a3b6d55"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e261307e67ca8f3f3d47909bb433d9b273bc5fde","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    quota_class \u003d Table(\u0027quota_classes\u0027, meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    quota_usage \u003d Table(\u0027quota_usages\u0027, meta, autoload\u003dTrue)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    quota.c.resource.alter(String(275))"},{"line_number":26,"context_line":"    quota_class.c.resource.alter(String(275))"},{"line_number":27,"context_line":"    quota_usage.c.resource.alter(String(275))"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_a37175aa","line":27,"range":{"start_line":25,"start_character":0,"end_line":27,"end_character":45},"in_reply_to":"fa7ab95a_4cbcae05","updated":"2016-08-29 13:39:14.000000000","message":"We can totally disregard SQLite as it isn\u0027t a production-grade configuration, so I don\u0027t worry about it.\n\nTake a look on the table in aforementioned docs and row \"Change data type of column\" in particular. I think that \"no\" in \"Allows Concurrent DML?\" will cause a lock for INSERTs, UPDATEs and DELETEs in these tables. Moreover table copying will make the lock even longer. The issue here is that long locks will time out requests which will de-facto cause downtime.\n\nI know it sucks, but as this is bug can be classified between low and medium, we can we at least try to think of a different solution?\n\nModifications of quota and quota_class tables are admin-facing, so we can probably just add a release note about the impact of the migration and go on with it, but quota_usage is another story.\n\nI also wonder how big are these tables on regular deployments. Should be O(n) where n is the number of projects, right?","commit_id":"ef91e054df835f391e8902ca9321a0751a3b6d55"},{"author":{"_account_id":20140,"name":"Karthik Prabhu Vinod","email":"karthik.prabhu.vinod@intel.com","username":"kprabhuv"},"change_message_id":"16810883f44794cc2e9bbb0edf5fccc31c40e4d1","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    quota_class \u003d Table(\u0027quota_classes\u0027, meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    quota_usage \u003d Table(\u0027quota_usages\u0027, meta, autoload\u003dTrue)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    quota.c.resource.alter(String(275))"},{"line_number":26,"context_line":"    quota_class.c.resource.alter(String(275))"},{"line_number":27,"context_line":"    quota_usage.c.resource.alter(String(275))"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_4cbcae05","line":27,"range":{"start_line":25,"start_character":0,"end_line":27,"end_character":45},"in_reply_to":"fa7ab95a_5312a2b5","updated":"2016-08-26 20:26:30.000000000","message":"Well yes. It does a Algorithmic copy of the same table rather than in place. But, isn\u0027t that something the MySQL db will take care of?\n\nThis could be a problem if the database is sqllite as we are dropping tables and creating new ones.\n\nWhy is this not an online schema change? we dont need any downtime right?\n\nwhat am i missing!","commit_id":"ef91e054df835f391e8902ca9321a0751a3b6d55"},{"author":{"_account_id":20140,"name":"Karthik Prabhu Vinod","email":"karthik.prabhu.vinod@intel.com","username":"kprabhuv"},"change_message_id":"89e571b727cb7395daa09e80bfacb5c413aa517e","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    quota_class \u003d Table(\u0027quota_classes\u0027, meta, autoload\u003dTrue)"},{"line_number":23,"context_line":"    quota_usage \u003d Table(\u0027quota_usages\u0027, meta, autoload\u003dTrue)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    quota.c.resource.alter(String(275))"},{"line_number":26,"context_line":"    quota_class.c.resource.alter(String(275))"},{"line_number":27,"context_line":"    quota_usage.c.resource.alter(String(275))"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_965d6a49","line":27,"range":{"start_line":25,"start_character":0,"end_line":27,"end_character":45},"in_reply_to":"fa7ab95a_a37175aa","updated":"2016-08-30 01:50:35.000000000","message":"Makes perfect sense. Thanks for the pointer.  Here are the quick alternatives\n\na.) Make sure we handle this in API and dont allow a volume-type to exceed more than 235 characters even though volume-type field can hold 256 characters.  We could throw an appropriate error here..but then it aggravates the problem for the customer who now has to deal with shorter volume-type names. Bad Idea!!\n\nb.) Another approach is to normalize the table in first normal form and extract the resource(volumes,snapshots etc) from the resource field and create a new column . This means we will have to change code at several places too. This will be INPLACE.\n\nAlthough here we don\u0027t need DB downtime, we may require restart of services to reflect new columns. Effort is larger!\n\nEach project can have 8 properties for each volume type in quotas. if we have 8 volume-types and all properties set for it, we see 64 entries for a project\n\nI somehow see an o(n*n).   :( \n\nPlease let me know if any of the above approaches make sense to you.","commit_id":"ef91e054df835f391e8902ca9321a0751a3b6d55"}],"cinder/db/sqlalchemy/migrate_repo/versions/080_update_quota_resource_length.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"63e6c99b5bc75133008ed88d0a6d8787270568b8","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from sqlalchemy import MetaData, String, Table"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"def upgrade(migrate_engine):"},{"line_number":17,"context_line":"    \"\"\"Increase the size of Quota table resource size to 275\"\"\""},{"line_number":18,"context_line":"    meta \u003d MetaData()"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_06162ca7","line":15,"updated":"2016-09-19 17:51:00.000000000","message":"Assuming we land https://review.openstack.org/#/c/372657/ , this file will need to move to at least version 085.","commit_id":"b1391a740195e686df90e928470368f4d28903b8"}],"cinder/tests/unit/test_migrations.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"04626d304fe20eade42606df773b9f97610e7a75","unresolved":false,"context_lines":[{"line_number":1051,"context_line":"        quota_class \u003d db_utils.get_table(engine, \u0027quota_classes\u0027)"},{"line_number":1052,"context_line":"        quota_usage \u003d db_utils.get_table(engine, \u0027quota_usages\u0027)"},{"line_number":1053,"context_line":""},{"line_number":1054,"context_line":"        self.assertEqual(quota.c.resource.type.length, 275)"},{"line_number":1055,"context_line":"        self.assertEqual(quota_class.c.resource.type.length, 275)"},{"line_number":1056,"context_line":"        self.assertEqual(quota_usage.c.resource.type.length, 275)"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"    def test_walk_versions(self):"},{"line_number":1059,"context_line":"        self.walk_versions(False, False)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8ec9b2_1303de74","line":1056,"range":{"start_line":1054,"start_character":25,"end_line":1056,"end_character":64},"updated":"2016-09-13 19:59:21.000000000","message":"Please switch these to be (expected, actual) to be consistent.","commit_id":"d8dee9bb04e4b1105dd57196a77104f932d4519c"}],"releasenotes/notes/increase_resource_length_quota_tables-28fb7e7e68778358.yaml":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"04626d304fe20eade42606df773b9f97610e7a75","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - When upgrading, this will perform a table copy of your"},{"line_number":4,"context_line":"    quotas, quota_classes \u0026 quota_usages and require"},{"line_number":5,"context_line":"    downtime in to prevent db locks for DML statements on"},{"line_number":6,"context_line":"    those table."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"7a8ec9b2_d37df6e8","line":3,"range":{"start_line":3,"start_character":20,"end_line":3,"end_character":29},"updated":"2016-09-13 19:59:21.000000000","message":"This what? This won\u0027t have any context in the release notes.\n\nTable copy appears to only be with sqlite, right? In that case this release note doesn\u0027t really apply to real deployments.","commit_id":"d8dee9bb04e4b1105dd57196a77104f932d4519c"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"04626d304fe20eade42606df773b9f97610e7a75","unresolved":false,"context_lines":[{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - When upgrading, this will perform a table copy of your"},{"line_number":4,"context_line":"    quotas, quota_classes \u0026 quota_usages and require"},{"line_number":5,"context_line":"    downtime in to prevent db locks for DML statements on"},{"line_number":6,"context_line":"    those table."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"7a8ec9b2_d32fb6f4","line":5,"range":{"start_line":5,"start_character":13,"end_line":5,"end_character":18},"updated":"2016-09-13 19:59:21.000000000","message":"/in to/in order to/ ?","commit_id":"d8dee9bb04e4b1105dd57196a77104f932d4519c"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"45427774231ff4c6f70893c35a2c06a3d9cb49cd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - When upgrading, this will perform a table copy of your"},{"line_number":4,"context_line":"    quotas, quota_classes \u0026 quota_usages and require"},{"line_number":5,"context_line":"    downtime in order to prevent db locks for DML statements"},{"line_number":6,"context_line":"    on those tables."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"7a8ec9b2_c11c2ec4","line":3,"range":{"start_line":3,"start_character":20,"end_line":3,"end_character":29},"updated":"2016-09-19 18:07:20.000000000","message":"\"this will\" what? Again, this won\u0027t make any sense in the compiled release notes. Please reword.","commit_id":"b1391a740195e686df90e928470368f4d28903b8"},{"author":{"_account_id":20140,"name":"Karthik Prabhu Vinod","email":"karthik.prabhu.vinod@intel.com","username":"kprabhuv"},"change_message_id":"4e8b508b5375c8797a0482b1b827fb99c6dfef2f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - When upgrading, this will perform a table copy of your"},{"line_number":4,"context_line":"    quotas, quota_classes \u0026 quota_usages and require"},{"line_number":5,"context_line":"    downtime in order to prevent db locks for DML statements"},{"line_number":6,"context_line":"    on those tables."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"7a8ec9b2_09e8b1e1","line":3,"range":{"start_line":3,"start_character":20,"end_line":3,"end_character":29},"in_reply_to":"7a8ec9b2_c11c2ec4","updated":"2016-09-20 23:14:26.000000000","message":"Sorry about that. I have rephrased it","commit_id":"b1391a740195e686df90e928470368f4d28903b8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"3d70615920f0218edbcdf606554d0eca15d68fb3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - Increasing the length of resource column in quotas,"},{"line_number":4,"context_line":"    quota_classes \u0026 quota_usages will result in table copy"},{"line_number":5,"context_line":"    by the MySQL engine, resulting in potential DB locks"},{"line_number":6,"context_line":"    Hence, it is advisable to perform DB migration 80 only during"},{"line_number":7,"context_line":"    dowtime"},{"line_number":8,"context_line":"fixes:"},{"line_number":9,"context_line":"  - fixed the bug where resource column in quota related tables"},{"line_number":10,"context_line":"    could not be longer than 255 characters"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5a8bc5a2_a4ed688d","line":7,"range":{"start_line":3,"start_character":0,"end_line":7,"end_character":11},"updated":"2016-09-22 15:04:00.000000000","message":"If we\u0027re going to get this in in that form, I would rephrase this to something like:\n\n When running MySQL as a DB backend, migration 80 will cause tables quotas,\n quota_classes and quota_usages to be locked and copied. If attempting this DB migration\n on a live Cinder deployment make sure to minimize these tables contents to keep tables locked\n for as short period as possible.","commit_id":"e60bebb4088dba8966037d6acd21391fde8f44e3"}]}
