)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"36a2d73e441ab5b287df807d4b3767c73fe77401","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ronald De Rose \u003cronald.de.rose@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-09-26 13:59:46 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add indexes to the revocation_event table"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I73ff077bb6dc3ca8821f8cc14639bf986517d158"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a8bc5a2_69ef2ce9","line":7,"updated":"2016-09-26 14:07:52.000000000","message":"but only the DateTime column.  Update if another revision.","commit_id":"f967a4d5714eefb194011d36f2ae2c80e2d6c027"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"dacd220ff6add0483fd156f5a216b4f7f4c0f499","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds indexes based on commonly used columns in the sql query."},{"line_number":10,"context_line":"More indexes can be added later if warranted, but don\u0027t see value in"},{"line_number":11,"context_line":"adding a ton of indexes at this point."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I73ff077bb6dc3ca8821f8cc14639bf986517d158"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5a8bc5a2_bcfec6ab","line":11,"updated":"2016-09-26 17:54:26.000000000","message":"I feel like I\u0027m arguing both sides of an argument here, but adding indexes without knowing _exactly_ the queries that will use them is a recipe for creating a write constrainted database server, and an unmaintainable set of indexes in a hurry. I\u0027d suggest running something like pt-query-digest during a tempest and rally run to get a sense of what queries are running and then make sure they\u0027re covered by sensible indexes.","commit_id":"66664cd16d9d33a8bace4b66f4f8806fa4ce45dd"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"bdbb0e2167234f00f294213d3b91208d06155c63","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds indexes based on commonly used columns in the sql query."},{"line_number":10,"context_line":"More indexes can be added later if warranted, but don\u0027t see value in"},{"line_number":11,"context_line":"adding a ton of indexes at this point."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I73ff077bb6dc3ca8821f8cc14639bf986517d158"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5a8bc5a2_d200db03","line":11,"in_reply_to":"5a8bc5a2_bcfec6ab","updated":"2016-09-26 18:08:17.000000000","message":"This really depends on your applications in the cloud; thus, could vary dramatically between clouds. For example, you may run applications that never revoke tokens. So difficult to measure.\n\nissued_before is always queried, so that is an easy one. And user_id and issued_before would be common.  I understand the write issue, but I think this would be a good start.","commit_id":"66664cd16d9d33a8bace4b66f4f8806fa4ce45dd"}],"keystone/common/sql/contract_repo/versions/010_contract_add_revocation_event_indexes.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"75048b827586069f53b8c923f62500796a665b88","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# This is a placeholder for Newton backports. Do not use this number for new"},{"line_number":14,"context_line":"# Ocata work. New Ocata work starts after all the placeholders."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a8bc5a2_c5c0bc2d","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":63},"updated":"2016-09-28 04:03:58.000000000","message":"not accurate","commit_id":"a4358e382bca40563cd15a77cec1b909f7b9b917"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"9e6877f02b7a16659c402c11606bbe742ac87a58","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# This is a placeholder for Newton backports. Do not use this number for new"},{"line_number":14,"context_line":"# Ocata work. New Ocata work starts after all the placeholders."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a8bc5a2_20c94ead","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":63},"in_reply_to":"5a8bc5a2_c5c0bc2d","updated":"2016-09-28 04:24:03.000000000","message":"Ug, keep doing that. Done.","commit_id":"a4358e382bca40563cd15a77cec1b909f7b9b917"}],"keystone/common/sql/data_migration_repo/versions/010_migrate_add_revocation_event_indexes.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"75048b827586069f53b8c923f62500796a665b88","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# This is a placeholder for Newton backports. Do not use this number for new"},{"line_number":14,"context_line":"# Ocata work. New Ocata work starts after all the placeholders."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a8bc5a2_05e1c4d0","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":63},"updated":"2016-09-28 04:03:58.000000000","message":"not accurate","commit_id":"a4358e382bca40563cd15a77cec1b909f7b9b917"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"9e6877f02b7a16659c402c11606bbe742ac87a58","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# This is a placeholder for Newton backports. Do not use this number for new"},{"line_number":14,"context_line":"# Ocata work. New Ocata work starts after all the placeholders."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a8bc5a2_40ce5ab5","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":63},"in_reply_to":"5a8bc5a2_05e1c4d0","updated":"2016-09-28 04:24:03.000000000","message":"Done","commit_id":"a4358e382bca40563cd15a77cec1b909f7b9b917"}],"keystone/common/sql/expand_repo/versions/010_add_revocation_event_indexes.py":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"dacd220ff6add0483fd156f5a216b4f7f4c0f499","unresolved":false,"context_lines":[{"line_number":22,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":23,"context_line":"    sql.Index(\u0027ix_revocation_issued_before_user_id\u0027,"},{"line_number":24,"context_line":"              revocation_event.c.issued_before,"},{"line_number":25,"context_line":"              revocation_event.c.user_id).create()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_7c019e37","line":25,"updated":"2016-09-26 17:54:26.000000000","message":"oops, this is backwards. please read this page:\n\nhttp://dev.mysql.com/doc/refman/5.7/en/range-optimization.html\n\nYou want user_id first so that the b-tree range algorithm can skip to the first record with user_id, and then apply b-tree ranges to the rest fo the records.","commit_id":"66664cd16d9d33a8bace4b66f4f8806fa4ce45dd"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"d8649c7a16cc12dd990985644928560f19527f8a","unresolved":false,"context_lines":[{"line_number":22,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":23,"context_line":"    sql.Index(\u0027ix_revocation_issued_before_user_id\u0027,"},{"line_number":24,"context_line":"              revocation_event.c.issued_before,"},{"line_number":25,"context_line":"              revocation_event.c.user_id).create()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_f2ef971b","line":25,"in_reply_to":"5a8bc5a2_7c019e37","updated":"2016-09-26 18:08:29.000000000","message":"Done","commit_id":"66664cd16d9d33a8bace4b66f4f8806fa4ce45dd"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"bdbb0e2167234f00f294213d3b91208d06155c63","unresolved":false,"context_lines":[{"line_number":22,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":23,"context_line":"    sql.Index(\u0027ix_revocation_issued_before_user_id\u0027,"},{"line_number":24,"context_line":"              revocation_event.c.issued_before,"},{"line_number":25,"context_line":"              revocation_event.c.user_id).create()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_b246ef4c","line":25,"in_reply_to":"5a8bc5a2_7c019e37","updated":"2016-09-26 18:08:17.000000000","message":"Nice catch.  Thanks Clint!","commit_id":"66664cd16d9d33a8bace4b66f4f8806fa4ce45dd"}],"keystone/common/sql/expand_repo/versions/010_expand_add_revocation_event_index.py":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"d36a6029f98f81f1145b2405ca89cf2f8002d06a","unresolved":false,"context_lines":[{"line_number":28,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":29,"context_line":"    sql.Index(\u0027ix_revocation_event_issued_before_audit_id\u0027,"},{"line_number":30,"context_line":"              revocation_event.c.issued_before,"},{"line_number":31,"context_line":"              revocation_event.c.audit_id).create()"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_ac1c5414","line":31,"updated":"2016-10-12 08:35:37.000000000","message":"I don\u0027t understand this last one. It won\u0027t be used most of the time, since a WHERE audit_id\u003d\u0027xxx\u0027 AND issued_before \u003e\u003d \u0027datething\u0027 will have to do the range query on issued_before, and won\u0027t be able to apply the audit_id at all. It\u0027s possible EXISTS queries will be able to do some magic there, so I could be wrong, but I\u0027d be interested to see EXPLAIN\u0027s, becuase I think the optimizer will favor range scanning the much smaller issued_before index in most cases.","commit_id":"a96f997ee7f28cae2ae7a677dca93ec9ca8b4da9"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"26fddfae7745d577a90332b99f9645c089c2f3cb","unresolved":false,"context_lines":[{"line_number":28,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":29,"context_line":"    sql.Index(\u0027ix_revocation_event_issued_before_audit_id\u0027,"},{"line_number":30,"context_line":"              revocation_event.c.issued_before,"},{"line_number":31,"context_line":"              revocation_event.c.audit_id).create()"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_81100a03","line":31,"updated":"2016-10-13 04:40:15.000000000","message":"The other ones put the ID first.\n\nThe order matters _a lot_ because issued_before is always a range search.\n\nWith the ID first, and criteria like \"audit_id\u003d\u0027foo\u0027 and issued_before \u003e\u003d \u00270000-00-00 00:00:00\u0027\", the index read will be a range query, but it can rapidly jump to the area where audit_id\u003dfoo first, and then continue walking down the b-tree to wherever the range ends. If the ID is second, then the index read has to find _all_ of the events that are \u003e\u003d \u00270000-00-00\u0027 first, and then walk them further to find audit_id.\n\nSo, you should get quite a bit faster results with the ID first.\n\nreference: http://dev.mysql.com/doc/refman/5.7/en/range-optimization.html","commit_id":"a96f997ee7f28cae2ae7a677dca93ec9ca8b4da9"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"e3bff38617822b9ca6134f5fed163f57f7ac8893","unresolved":false,"context_lines":[{"line_number":28,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":29,"context_line":"    sql.Index(\u0027ix_revocation_event_issued_before_audit_id\u0027,"},{"line_number":30,"context_line":"              revocation_event.c.issued_before,"},{"line_number":31,"context_line":"              revocation_event.c.audit_id).create()"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_72daca4d","line":31,"in_reply_to":"fa6399be_81100a03","updated":"2016-10-13 15:39:03.000000000","message":"Done","commit_id":"a96f997ee7f28cae2ae7a677dca93ec9ca8b4da9"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"52c628440d220c9f0a56134ad3e640a06290e396","unresolved":false,"context_lines":[{"line_number":28,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":29,"context_line":"    sql.Index(\u0027ix_revocation_event_issued_before_audit_id\u0027,"},{"line_number":30,"context_line":"              revocation_event.c.issued_before,"},{"line_number":31,"context_line":"              revocation_event.c.audit_id).create()"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_a1ec2e90","line":31,"in_reply_to":"fa6399be_81100a03","updated":"2016-10-13 05:13:40.000000000","message":"makes sense to me, let\u0027s flip audit_id and issued_before","commit_id":"a96f997ee7f28cae2ae7a677dca93ec9ca8b4da9"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"e3bff38617822b9ca6134f5fed163f57f7ac8893","unresolved":false,"context_lines":[{"line_number":28,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":29,"context_line":"    sql.Index(\u0027ix_revocation_event_issued_before_audit_id\u0027,"},{"line_number":30,"context_line":"              revocation_event.c.issued_before,"},{"line_number":31,"context_line":"              revocation_event.c.audit_id).create()"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_92dbde4e","line":31,"in_reply_to":"fa6399be_a1ec2e90","updated":"2016-10-13 15:39:03.000000000","message":"Done","commit_id":"a96f997ee7f28cae2ae7a677dca93ec9ca8b4da9"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"1a8f7f158b21c3bacc12cd64bce7d223d816e550","unresolved":false,"context_lines":[{"line_number":28,"context_line":"              revocation_event.c.issued_before).create()"},{"line_number":29,"context_line":"    sql.Index(\u0027ix_revocation_event_issued_before_audit_id\u0027,"},{"line_number":30,"context_line":"              revocation_event.c.issued_before,"},{"line_number":31,"context_line":"              revocation_event.c.audit_id).create()"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_b9b1d4e3","line":31,"in_reply_to":"fa6399be_ac1c5414","updated":"2016-10-12 21:22:34.000000000","message":"I\u0027m not sure how this composite index is different than the other indexes and it matches the query conditions. But as you say, it won\u0027t hurt anything by adding it.","commit_id":"a96f997ee7f28cae2ae7a677dca93ec9ca8b4da9"}],"keystone/tests/unit/test_sql_upgrade.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"be2f17a1a82abc9422b8f08fa465241aa17094d8","unresolved":false,"context_lines":[{"line_number":1784,"context_line":"            self.assertEqual(\u0027DATETIME\u0027, str(password.c.created_at.type))"},{"line_number":1785,"context_line":"        self.assertFalse(password.c.created_at.nullable)"},{"line_number":1786,"context_line":""},{"line_number":1787,"context_line":"    def test_migration_010_add_revocation_event_indexes(self):"},{"line_number":1788,"context_line":"        self.expand(9)"},{"line_number":1789,"context_line":"        self.migrate(9)"},{"line_number":1790,"context_line":"        self.contract(9)"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_22e9471b","line":1787,"updated":"2016-10-11 17:03:13.000000000","message":"Glad to see this tested against MySQL and Postgres. Does SQLite support indexes?","commit_id":"efbd134945cc675a7a8b2776f08f8b8cf9357974"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"e5ba6311ef406e5e6b117e812e979835cc5c74a7","unresolved":false,"context_lines":[{"line_number":1784,"context_line":"            self.assertEqual(\u0027DATETIME\u0027, str(password.c.created_at.type))"},{"line_number":1785,"context_line":"        self.assertFalse(password.c.created_at.nullable)"},{"line_number":1786,"context_line":""},{"line_number":1787,"context_line":"    def test_migration_010_add_revocation_event_indexes(self):"},{"line_number":1788,"context_line":"        self.expand(9)"},{"line_number":1789,"context_line":"        self.migrate(9)"},{"line_number":1790,"context_line":"        self.contract(9)"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_62ab3f8a","line":1787,"in_reply_to":"fa6399be_22e9471b","updated":"2016-10-11 17:08:56.000000000","message":"Yes, SQLite does support indexes.","commit_id":"efbd134945cc675a7a8b2776f08f8b8cf9357974"}]}
