)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"748eaadc02efaf9145e2f02d37c3772fcb3fa7b9","unresolved":true,"context_lines":[{"line_number":9,"context_line":"This commit adds two new indexes to the \u0027migrations\u0027 table:"},{"line_number":10,"context_line":"- migrations_by_src_host_nodes_and_status_idx"},{"line_number":11,"context_line":"- migrations_by_dest_host_nodes_and_status_idx"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"These indexes are required to efficiently support queries that filter on either"},{"line_number":14,"context_line":"(source_compute AND source_node) OR (dest_compute AND dest_node), which is a common"},{"line_number":15,"context_line":"pattern when looking for migrations related to a specific compute node."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This query is used in the _cleanup_incomplete_migrations periodic task"},{"line_number":18,"context_line":"(per default executed every 5 minutes by every compute node)."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"a889e01e_4cd35e8c","line":16,"range":{"start_line":12,"start_character":1,"end_line":16,"end_character":1},"updated":"2026-03-09 17:42:58.000000000","message":"nit: can you wrap at \u003c\u003d72 chars","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"37be468bb2cc5b2ff26948010bab0f0173043676","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This commit adds two new indexes to the \u0027migrations\u0027 table:"},{"line_number":10,"context_line":"- migrations_by_src_host_nodes_and_status_idx"},{"line_number":11,"context_line":"- migrations_by_dest_host_nodes_and_status_idx"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"These indexes are required to efficiently support queries that filter on either"},{"line_number":14,"context_line":"(source_compute AND source_node) OR (dest_compute AND dest_node), which is a common"},{"line_number":15,"context_line":"pattern when looking for migrations related to a specific compute node."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This query is used in the _cleanup_incomplete_migrations periodic task"},{"line_number":18,"context_line":"(per default executed every 5 minutes by every compute node)."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"152159fb_d8af0a16","line":16,"range":{"start_line":12,"start_character":1,"end_line":16,"end_character":1},"in_reply_to":"a889e01e_4cd35e8c","updated":"2026-03-10 09:53:37.000000000","message":"Acknowledged","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"dcdbcdda295c0eb58421d94b2671792c694d970a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"26d8ccd1_3b17ee0a","updated":"2026-03-10 13:52:41.000000000","message":"Agree, I think we probably should not rush to merge this right now before RC1, but this definitely looks like something we should be doing. Max, after RC1 is out and the branch is open please nag me to get this in.","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"69c1fb1be46a90a0405c32a6cb0666c55049ef25","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3a3249de_acebafd7","updated":"2026-03-09 17:33:09.000000000","message":"i would need to dig into the deails more here to feel comfortable +2ing \n\ni think this is a valid approch to impvoe the performace\n\n\ni believe this will be applied as part fo the online expand migration rather the the data migration when we are applying the new shema but running the old nova code.\n\nthat might take some time if the db needs to index a lot of record but it can happen outside the maintaicne window of the actual upgrade. \n\nthe greade jobs are passing but i think we probably shoudl have an upgrade release note to note that.","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"37be468bb2cc5b2ff26948010bab0f0173043676","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f7bf2e16_37da5e9e","in_reply_to":"3a3249de_acebafd7","updated":"2026-03-10 09:53:37.000000000","message":"I have added a upgrade release note. Pls let me know if anything else is missing","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8dd0a8b9f45cc290b2e0a10d734c064e369c02d7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"53f0653b_9804fb91","updated":"2026-03-16 18:03:17.000000000","message":"Okay I thought this was a NoDBTestCase but I see it actually inherits from a regular one between the first one at the top of the file and the class it\u0027s in.","commit_id":"dea91726b2d916f59e625868fef2376f1c197a34"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"1f62866f0eb40bea5acf7bc700a566b85f90da37","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b8948223_3233c125","updated":"2026-04-07 19:17:46.000000000","message":"recheck - SSL errors(opendevstatus: gitea backends high load)","commit_id":"dea91726b2d916f59e625868fef2376f1c197a34"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"d85dec765f567eb38fde8528acaccd492b526e2f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"22f168eb_8b0f6b1e","updated":"2026-03-12 07:14:45.000000000","message":"recheck - nova-tox-functional-py313 - not install packages due to an OSError: (\u0027Connection broken: IncompleteRead","commit_id":"dea91726b2d916f59e625868fef2376f1c197a34"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2637120600a5989ddff391a4b494a9b7da4e8876","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7529f4cc_aef1bfdd","updated":"2026-04-07 14:45:33.000000000","message":"we are now passed the feeze peroid and the 2026.1 release happend last week so i think we can now proceed with this.\n\nthanks for the effort here","commit_id":"dea91726b2d916f59e625868fef2376f1c197a34"}],"nova/db/main/migrations/versions/ab450ba04102_db_add_indexes_for_source_dest_.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"748eaadc02efaf9145e2f02d37c3772fcb3fa7b9","unresolved":true,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def upgrade():"},{"line_number":30,"context_line":"    # ### commands auto generated by Alembic - please adjust! ###"},{"line_number":31,"context_line":"    with op.batch_alter_table(\"migrations\", schema\u003dNone) as batch_op:"},{"line_number":32,"context_line":"        batch_op.create_index("},{"line_number":33,"context_line":"            \"migrations_by_dest_host_nodes_and_status_idx\","}],"source_content_type":"text/x-python","patch_set":1,"id":"662f29f5_0b311f88","line":30,"updated":"2026-03-09 17:42:58.000000000","message":"Can you drop this?","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"37be468bb2cc5b2ff26948010bab0f0173043676","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def upgrade():"},{"line_number":30,"context_line":"    # ### commands auto generated by Alembic - please adjust! ###"},{"line_number":31,"context_line":"    with op.batch_alter_table(\"migrations\", schema\u003dNone) as batch_op:"},{"line_number":32,"context_line":"        batch_op.create_index("},{"line_number":33,"context_line":"            \"migrations_by_dest_host_nodes_and_status_idx\","}],"source_content_type":"text/x-python","patch_set":1,"id":"c6b38c89_64e62724","line":30,"in_reply_to":"662f29f5_0b311f88","updated":"2026-03-10 09:53:37.000000000","message":"Done","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"}],"nova/db/main/models.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d2da97ea2667b4aa7bd6162370f0d457b24d00d8","unresolved":true,"context_lines":[{"line_number":892,"context_line":"    __table_args__ \u003d ("},{"line_number":893,"context_line":"        sa.Index(\u0027migrations_instance_uuid_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":894,"context_line":"              \u0027instance_uuid\u0027, \u0027status\u0027),"},{"line_number":895,"context_line":"        sa.Index(\u0027migrations_by_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":896,"context_line":"              \u0027source_compute\u0027, \u0027dest_compute\u0027, \u0027source_node\u0027, \u0027dest_node\u0027,"},{"line_number":897,"context_line":"              \u0027status\u0027),"},{"line_number":898,"context_line":"        sa.Index(\u0027migrations_by_src_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":899,"context_line":"              \u0027source_compute\u0027, \u0027source_node\u0027,"},{"line_number":900,"context_line":"              \u0027status\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"56427422_2d97c097","line":897,"range":{"start_line":895,"start_character":7,"end_line":897,"end_character":24},"updated":"2026-03-09 18:01:46.000000000","message":"i guess its been a long time since i really looked at the sematics fo db indexes but i actully expect this to work for the sub set of fiels\n\nbut i guess we only hit it if we quity with both the souce and dest?\n\nmigrations_by_host_nodes_and_status_idx was i think intended to cover the usecase you are optimising\n\nlater\nah its \"The Left-Prefix Rule\"\nmigrations_by_host_nodes_and_status_idx will work for \n\n`WHERE delete\u003d0 and source_compute\u003d\u0027A\u0027 AND dest_compute\u003d\u0027B\u0027`\nor just `WHERE delete\u003d0 and source_compute\u003d\u0027A\u0027` \n\nbut not `WHERE source_compute\u003d\u0027A\u0027 AND status\u003d\u0027running\u0027` or `WHERE dest_compute\u003d\u0027B\u0027 AND status\u003d\u0027confirmed\u0027` because teh db cant jump over the intervneing columes and has to fall back to effectivly a full table scan ranther then usign the index.\n\n\nso answering my own question this is defiantly a valid performance optimization\nassumign we alsy lookup host by both source_compute and source_node when we want to filter by status","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4640d47fab52ca380c2708a1a76fa6482ca70211","unresolved":false,"context_lines":[{"line_number":892,"context_line":"    __table_args__ \u003d ("},{"line_number":893,"context_line":"        sa.Index(\u0027migrations_instance_uuid_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":894,"context_line":"              \u0027instance_uuid\u0027, \u0027status\u0027),"},{"line_number":895,"context_line":"        sa.Index(\u0027migrations_by_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":896,"context_line":"              \u0027source_compute\u0027, \u0027dest_compute\u0027, \u0027source_node\u0027, \u0027dest_node\u0027,"},{"line_number":897,"context_line":"              \u0027status\u0027),"},{"line_number":898,"context_line":"        sa.Index(\u0027migrations_by_src_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":899,"context_line":"              \u0027source_compute\u0027, \u0027source_node\u0027,"},{"line_number":900,"context_line":"              \u0027status\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"90fcc3fc_d6186725","line":897,"range":{"start_line":895,"start_character":7,"end_line":897,"end_character":24},"in_reply_to":"56427422_2d97c097","updated":"2026-03-09 18:13:23.000000000","message":"Acknowledged","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4640d47fab52ca380c2708a1a76fa6482ca70211","unresolved":true,"context_lines":[{"line_number":895,"context_line":"        sa.Index(\u0027migrations_by_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":896,"context_line":"              \u0027source_compute\u0027, \u0027dest_compute\u0027, \u0027source_node\u0027, \u0027dest_node\u0027,"},{"line_number":897,"context_line":"              \u0027status\u0027),"},{"line_number":898,"context_line":"        sa.Index(\u0027migrations_by_src_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":899,"context_line":"              \u0027source_compute\u0027, \u0027source_node\u0027,"},{"line_number":900,"context_line":"              \u0027status\u0027),"},{"line_number":901,"context_line":"        sa.Index(\u0027migrations_by_dest_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":902,"context_line":"              \u0027dest_compute\u0027, \u0027dest_node\u0027,"},{"line_number":903,"context_line":"              \u0027status\u0027),"},{"line_number":904,"context_line":"        sa.Index(\u0027migrations_uuid\u0027, \u0027uuid\u0027, unique\u003dTrue),"},{"line_number":905,"context_line":"        sa.Index(\u0027migrations_updated_at_idx\u0027, \u0027updated_at\u0027),"},{"line_number":906,"context_line":"        sa.Index(\u0027migrations_dest_compute_id_deleted_idx\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"35664556_757099d6","line":903,"range":{"start_line":898,"start_character":6,"end_line":903,"end_character":24},"updated":"2026-03-09 18:13:23.000000000","message":"looking at how this is used we are not actully useing source node or dest node\n \nthe migreate filester are \n \n migration_filters \u003d {\u0027host\u0027: CONF.host,\n                       \u0027status\u0027: \u0027error\u0027}\nhttps://opendev.org/openstack/nova/src/branch/master/nova/compute/manager.py#L12122\n\nwhich is translated too\n    if \"host\" in filters:\n        host \u003d filters[\"host\"]\n        query \u003d query.filter(sql.or_(\n            models.Migration.source_compute \u003d\u003d host,\n            models.Migration.dest_compute \u003d\u003d host))\nhttps://github.com/openstack/nova/blob/master/nova/db/main/api.py#L3388-L3392\n\nso we could redue the index size by useing \n\n```\nsa.Index(\u0027migrations_by_src_host_and_status_idx\u0027, \u0027deleted\u0027, \u0027source_compute\u0027, \u0027status\u0027)\nsa.Index(\u0027migrations_by_dest_host_and_status_idx\u0027, \u0027deleted\u0027, \u0027dest_compute\u0027, \u0027status\u0027)\n```\n\nwas there a speciifc reason to include source_node and dest_node?","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5640800cf1f747d21d3342d1c227d7ba5fd31129","unresolved":false,"context_lines":[{"line_number":895,"context_line":"        sa.Index(\u0027migrations_by_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":896,"context_line":"              \u0027source_compute\u0027, \u0027dest_compute\u0027, \u0027source_node\u0027, \u0027dest_node\u0027,"},{"line_number":897,"context_line":"              \u0027status\u0027),"},{"line_number":898,"context_line":"        sa.Index(\u0027migrations_by_src_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":899,"context_line":"              \u0027source_compute\u0027, \u0027source_node\u0027,"},{"line_number":900,"context_line":"              \u0027status\u0027),"},{"line_number":901,"context_line":"        sa.Index(\u0027migrations_by_dest_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,"},{"line_number":902,"context_line":"              \u0027dest_compute\u0027, \u0027dest_node\u0027,"},{"line_number":903,"context_line":"              \u0027status\u0027),"},{"line_number":904,"context_line":"        sa.Index(\u0027migrations_uuid\u0027, \u0027uuid\u0027, unique\u003dTrue),"},{"line_number":905,"context_line":"        sa.Index(\u0027migrations_updated_at_idx\u0027, \u0027updated_at\u0027),"},{"line_number":906,"context_line":"        sa.Index(\u0027migrations_dest_compute_id_deleted_idx\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"604798aa_9c642e41","line":903,"range":{"start_line":898,"start_character":6,"end_line":903,"end_character":24},"in_reply_to":"35664556_757099d6","updated":"2026-03-09 18:34:06.000000000","message":"by the way form your testign thsi is obviouly effective as is im just wonderign\n\nif there is a spcifdic quesry that modivaed the inlcution of souce_node or dest_node since _cleanup_incomplete_migrations does not appear to use those.\n\ni guess its thise right get_in_progress_by_host_and_node\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/services.py#L352-L354\n\nwe do that in a cople of plases and obviously you can list by them in the api too\n\n\nthe reason im saying this is with the current index \n\nsa.Index(\u0027migrations_by_src_host_nodes_and_status_idx\u0027, \u0027deleted\u0027,\n              \u0027source_compute\u0027, \u0027source_node\u0027,\n              \u0027status\u0027),\n              \n\nthe db cant skip over souce_node and has to scan the filter resutls after delete and souce are applied which is still way faster then a full table scan\n\n\nfor libvirt the 3 colum index woudl be more effience as host and node are alwasy the same but for vmware the 4 colum case is pretty close for libvirt and actully works proprely for vmware so we shoudl keep this as currently proposed.\n\ni woudl also include ironic in that argument but you cante live migrate ironic nodes without manual labour.","commit_id":"785fb8fcc01c0f61f22fc3ef12efde5c9633df3c"}],"nova/tests/unit/db/main/test_api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"02a4cab7affe067bb486d70e1205b7e2a46db591","unresolved":true,"context_lines":[{"line_number":1177,"context_line":"        sources \u003d [x[\u0027source_compute\u0027] for x in migrations]"},{"line_number":1178,"context_line":"        self.assertEqual([\u0027host2\u0027, \u0027host2\u0027], sorted(sources))"},{"line_number":1179,"context_line":"        dests \u003d [x[\u0027dest_compute\u0027] for x in migrations]"},{"line_number":1180,"context_line":"        self.assertEqual([\u0027host1\u0027, \u0027host3\u0027], sorted(dests))"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"    def test_get_migrations_by_filters_instance_uuid(self):"},{"line_number":1183,"context_line":"        migrations \u003d db.migration_get_all_by_filters(self.ctxt, filters\u003d{})"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ead6ced_af939010","line":1180,"updated":"2026-03-16 17:54:10.000000000","message":"This is a welcome change in general, but.. is it related to the actual index add here? If not, we should pull this out into a different patch.","commit_id":"dea91726b2d916f59e625868fef2376f1c197a34"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"34d2a72a4dea1df61165c82654cc7618e22a8e5c","unresolved":true,"context_lines":[{"line_number":1177,"context_line":"        sources \u003d [x[\u0027source_compute\u0027] for x in migrations]"},{"line_number":1178,"context_line":"        self.assertEqual([\u0027host2\u0027, \u0027host2\u0027], sorted(sources))"},{"line_number":1179,"context_line":"        dests \u003d [x[\u0027dest_compute\u0027] for x in migrations]"},{"line_number":1180,"context_line":"        self.assertEqual([\u0027host1\u0027, \u0027host3\u0027], sorted(dests))"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"    def test_get_migrations_by_filters_instance_uuid(self):"},{"line_number":1183,"context_line":"        migrations \u003d db.migration_get_all_by_filters(self.ctxt, filters\u003d{})"}],"source_content_type":"text/x-python","patch_set":2,"id":"d5e930c0_56894845","line":1180,"in_reply_to":"3ead6ced_af939010","updated":"2026-03-16 17:58:58.000000000","message":"Yes - actually the index change, changed the order 😊 Without that, the test will fail.","commit_id":"dea91726b2d916f59e625868fef2376f1c197a34"}]}
