)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"d86e018a269e2c062348fa6175ddfa2b23c7bc76","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"d2afd7cf_9402bce8","updated":"2025-11-24 08:32:27.000000000","message":"We did a similar index on our cluster, but only the latest one.\nWhy do you create the first one?","commit_id":"f5f54c143c61fb8753d96b9ff9c23741ba893285"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"604518f200de4b46767720743065aaafeac62258","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"453b8ca0_8e96debe","in_reply_to":"6bb9d3a3_6c0e03a5","updated":"2025-11-25 13:32:07.000000000","message":"I think it would depend on the system usage pattern - whichever revocation events are representing the majority: regular token revokes, trust revokes, etc. Based on that db will decide whether existing indexes make sense.\nTo be honest I still wonder that the first index had a major effect, since every lookup will contain issued_before and audit_id (already existing index). Maybe in your case DB decided to join 2 indexes, in such case the second index would logically not bring much improvement, since it is already included in 2 other indexes.\nAnyway, unless the index is too huge I do not think it is a real problem having it. The real problem is that the table becomes too big. This is not as it was supposed to happen, but fixing that is most likely not that easy.","commit_id":"f5f54c143c61fb8753d96b9ff9c23741ba893285"},{"author":{"_account_id":29422,"name":"Olivier Chaze","display_name":"Olivier Chaze","email":"olivier.chaze@infomaniak.com","username":"o.chaze"},"change_message_id":"6e1a1916dc087b07d713fd792931a15aaa718857","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"6bb9d3a3_6c0e03a5","in_reply_to":"d2afd7cf_9402bce8","updated":"2025-11-25 13:19:38.000000000","message":"Hi Arnaud,\n\nIn our setup, the first option had the greatest impact on reducing CPU load.\nThe second one also helped, but to a lesser degree.","commit_id":"f5f54c143c61fb8753d96b9ff9c23741ba893285"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"8bdebf0580739bfc09cb720186ecc1a98488caf9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"e527b064_9e0ab8cc","updated":"2025-11-24 13:55:09.000000000","message":"@Arnaud - I think now pep will again complain, since the format is not what ruff will do.","commit_id":"17992c819178dfa272008a8587e92800e0b55820"},{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"feaa0ad03d69f3af1c00a9b305af0795ed60a4ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ca0afc64_dd66f647","updated":"2025-11-24 19:30:20.000000000","message":"Damn, right, I will ruff it tomorrow then","commit_id":"17992c819178dfa272008a8587e92800e0b55820"},{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"450ddf76f03184dc557e0301d9efebc2adfd6881","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"50445bf6_ac77a5b2","updated":"2025-11-25 12:34:20.000000000","message":"Also, I discovered that there is no magic happening to apply the expand upgrade.\nIt needs to be explicitely given in upgrades.py, see here as e.g.\nhttps://review.opendev.org/c/openstack/keystone/+/968300","commit_id":"b29af84e95f2671bb150542638e0eeabb56a5a60"},{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"b74f7cd2c72f2f2b58b89536f2690899f306a43d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"5c977f03_10dbb343","in_reply_to":"50445bf6_ac77a5b2","updated":"2025-11-25 19:26:59.000000000","message":"Done","commit_id":"b29af84e95f2671bb150542638e0eeabb56a5a60"}],"keystone/common/sql/migrations/versions/2024.01/expand/e19ee1de655c_add_index_in_revocation_event.py":[{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"9cd0cb65883c0d1c0a47e6ce68b7cc122b5b42e4","unresolved":true,"context_lines":[{"line_number":26,"context_line":"depends_on \u003d None"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def upgrade():"},{"line_number":29,"context_line":"    op.create_index(\u0027idx_revocation_event_project_id_user_id\u0027, \u0027revocation_event\u0027, [\u0027project_id,user_id\u0027])"},{"line_number":30,"context_line":"    op.create_index(\u0027idx_revocation_event_composite\u0027, \u0027revocation_event\u0027, [\u0027issued_before,user_id,project_id,audit_id\u0027])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def downgrade():"}],"source_content_type":"text/x-python","patch_set":3,"id":"84daa31c_434b6346","line":29,"updated":"2025-11-24 08:32:45.000000000","message":"Why is this index needed?","commit_id":"f5f54c143c61fb8753d96b9ff9c23741ba893285"},{"author":{"_account_id":29422,"name":"Olivier Chaze","display_name":"Olivier Chaze","email":"olivier.chaze@infomaniak.com","username":"o.chaze"},"change_message_id":"6e1a1916dc087b07d713fd792931a15aaa718857","unresolved":false,"context_lines":[{"line_number":26,"context_line":"depends_on \u003d None"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def upgrade():"},{"line_number":29,"context_line":"    op.create_index(\u0027idx_revocation_event_project_id_user_id\u0027, \u0027revocation_event\u0027, [\u0027project_id,user_id\u0027])"},{"line_number":30,"context_line":"    op.create_index(\u0027idx_revocation_event_composite\u0027, \u0027revocation_event\u0027, [\u0027issued_before,user_id,project_id,audit_id\u0027])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def downgrade():"}],"source_content_type":"text/x-python","patch_set":3,"id":"4e134ea3_0f1d4359","line":29,"in_reply_to":"84daa31c_434b6346","updated":"2025-11-25 13:19:38.000000000","message":"Acknowledged","commit_id":"f5f54c143c61fb8753d96b9ff9c23741ba893285"}],"keystone/common/sql/migrations/versions/2026.01/expand/742c857f1dfb_add_index_in_revocation_event.py":[{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"a2c0d1af814bee2110c2bfe70fbc0693b99b65ac","unresolved":true,"context_lines":[{"line_number":31,"context_line":"    op.create_index("},{"line_number":32,"context_line":"        \u0027idx_revocation_event_project_id_user_id\u0027,"},{"line_number":33,"context_line":"        \u0027revocation_event\u0027,"},{"line_number":34,"context_line":"        [\u0027project_id,user_id\u0027],"},{"line_number":35,"context_line":"    )"},{"line_number":36,"context_line":"    op.create_index("},{"line_number":37,"context_line":"        \u0027idx_revocation_event_composite\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5ea41002_15b5853e","line":34,"updated":"2025-11-25 12:32:12.000000000","message":"Before approving, I want to understand why this index was needed for infomaniak, because on our side (OVH), only the second one was needed","commit_id":"b29af84e95f2671bb150542638e0eeabb56a5a60"},{"author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"change_message_id":"283504bb7925c3379e896d6708ed9408239bcbb6","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    op.create_index("},{"line_number":32,"context_line":"        \u0027idx_revocation_event_project_id_user_id\u0027,"},{"line_number":33,"context_line":"        \u0027revocation_event\u0027,"},{"line_number":34,"context_line":"        [\u0027project_id,user_id\u0027],"},{"line_number":35,"context_line":"    )"},{"line_number":36,"context_line":"    op.create_index("},{"line_number":37,"context_line":"        \u0027idx_revocation_event_composite\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"cc57d671_af4208f8","line":34,"in_reply_to":"521357b1_b4d8c695","updated":"2025-11-25 13:27:04.000000000","message":"ok, thanks!","commit_id":"b29af84e95f2671bb150542638e0eeabb56a5a60"},{"author":{"_account_id":29422,"name":"Olivier Chaze","display_name":"Olivier Chaze","email":"olivier.chaze@infomaniak.com","username":"o.chaze"},"change_message_id":"6e1a1916dc087b07d713fd792931a15aaa718857","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    op.create_index("},{"line_number":32,"context_line":"        \u0027idx_revocation_event_project_id_user_id\u0027,"},{"line_number":33,"context_line":"        \u0027revocation_event\u0027,"},{"line_number":34,"context_line":"        [\u0027project_id,user_id\u0027],"},{"line_number":35,"context_line":"    )"},{"line_number":36,"context_line":"    op.create_index("},{"line_number":37,"context_line":"        \u0027idx_revocation_event_composite\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"521357b1_b4d8c695","line":34,"in_reply_to":"5ea41002_15b5853e","updated":"2025-11-25 13:19:38.000000000","message":"Back then after analyzing slow logs in our setup the first index gave better results. Attachink a link to a CPU load screesnhot after appliying the index 17/09/2024, https://www.swisstransfer.com/d/f87310a2-33e9-41a4-b164-b42a086c9cc6","commit_id":"b29af84e95f2671bb150542638e0eeabb56a5a60"}]}
