)]}'
{"id":"openstack%2Fplacement~964222","triplet_id":"openstack%2Fplacement~stable%2F2025.1~I13ab83a165c229ae57876df4570e8af25221a45e","project":"openstack/placement","branch":"stable/2025.1","topic":"bug/2126751","attention_set":{},"removed_from_attention_set":{"9708":{"account":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"last_update":"2026-01-10 12:18:07.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"I13ab83a165c229ae57876df4570e8af25221a45e","subject":"Prune a_c search space by invalid prefixes","status":"MERGED","created":"2025-10-16 14:24:38.000000000","updated":"2026-01-10 12:18:57.000000000","submitted":"2026-01-10 12:18:07.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":2,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"964222-bug/2126751","meta_rev_id":"8b177a7af54c6d44e1ab10355c5b0f3955184e2a","_number":964222,"virtual_id_number":964222,"owner":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":0,"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2026-01-10 12:18:07.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"all":[{"value":2,"date":"2025-11-28 16:46:54.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":2,"date":"2026-01-08 14:22:51.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"all":[{"value":0,"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":1,"date":"2026-01-08 14:22:51.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":0,"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{" 0":"Default Priority","+1":"Contributor Review Promise","+2":"Core Review Promise"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2025-10-16 16:01:06.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2025-11-28 16:46:54.000000000","updated_by":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"reviewer":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"state":"REVIEWER"},{"updated":"2026-01-08 14:22:51.000000000","updated_by":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"reviewer":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"state":"REVIEWER"}],"messages":[{"id":"97d59149f1096540b62302fc22ee0829d515647e","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2025-10-16 14:24:38.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"2cf493e6493d689a89c13e774eb0e945b9327259","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2025-10-16 16:01:06.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/3176c48e91d0413ab86a7f434ad35ec9\n\n- grenade https://zuul.opendev.org/t/openstack/build/16e826de381c4d7d803119cc46ae3411 : SUCCESS in 1h 00m 02s\n- grenade-skip-level-always https://zuul.opendev.org/t/openstack/build/67b0651efb4944ea8f8d24d338836d76 : SUCCESS in 56m 49s\n- tempest-integrated-placement https://zuul.opendev.org/t/openstack/build/b41309a8c8a34e9e9191c0acf2cc9fa3 : SUCCESS in 1h 10m 09s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/b6fa66adf7e941a7ac6e1e6334a345ba : SUCCESS in 1h 06m 49s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/df90343e58294433811bf14415d5b55b : SUCCESS in 18m 24s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/57198bb9a07a43af9bb0eaaeb29e7c2e : SUCCESS in 4m 23s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/51405c6e53a54832b7d4c058c0377173 : SUCCESS in 4m 48s\n- openstack-tox-py312 https://zuul.opendev.org/t/openstack/build/45120f12d189456d9ccce577bc923b2b : SUCCESS in 6m 16s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/ac3b65b14f40421e8656c2291da4c767 : SUCCESS in 9m 23s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/f8fcbaaf10f74cd5bdebadc888ab27e0 : SUCCESS in 4m 59s\n- openstack-tox-functional-py39 https://zuul.opendev.org/t/openstack/build/0cb77ee8d00046c2a286c41fe57e62ff : SUCCESS in 6m 46s\n- openstack-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/10e4e911b45b4886af8e9f168568543f : SUCCESS in 9m 39s\n- placement-nova-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/18c8f256732c473a822579eb4bf11925 : SUCCESS in 21m 32s\n- placement-nested-perfload https://zuul.opendev.org/t/openstack/build/3cef73e50b264baa8a61250498485f97 : SUCCESS in 25m 43s (non-voting)\n- placement-perfload https://zuul.opendev.org/t/openstack/build/e558d349fc874c1c99b079d6c5c7f474 : FAILURE in 1m 42s (non-voting)\n- tempest-integrated-placement-ubuntu-jammy https://zuul.opendev.org/t/openstack/build/04d2ee697c5f47058f22695ad7017071 : SUCCESS in 1h 31m 36s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/442799eb78e2429f8f61c2c3149171e8 : SUCCESS in 55m 44s","accounts_in_message":[],"_revision_number":1},{"id":"d9e5764a240c1858ef791924932469e1d4b7b32a","author":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"date":"2025-11-28 16:46:54.000000000","message":"Patch Set 1: Code-Review+2\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"a1bea8696c59c6535dbc6dcff41925e1c451d603","author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"date":"2026-01-08 14:22:51.000000000","message":"Patch Set 1: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":1},{"id":"03f8d9fca2f60e535c92a1f807bb79c9d313301f","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-01-08 14:24:46.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"c8252788c8a6fce49fa486bf3941154f11424315","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-01-08 17:53:02.000000000","message":"Patch Set 1: Verified-2\n\nThis change depends on a change that failed to merge.\n\nChange https://review.opendev.org/c/openstack/placement/+/964221 is needed.","accounts_in_message":[],"_revision_number":1},{"id":"20a1a13c1e6581342d103fad7046daf42478a592","author":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"date":"2026-01-10 08:01:46.000000000","message":"Patch Set 1:\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"f67b9632a343bc68e3f61b327f797d0087111452","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-01-10 10:22:32.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/ca766ec1ecad4b7a8900b3dc3595eebb\n\n- grenade https://zuul.opendev.org/t/openstack/build/a33dd5eb62a2449d8871efeca1291844 : SUCCESS in 55m 50s\n- grenade-skip-level-always https://zuul.opendev.org/t/openstack/build/ed11757bce834c9a8195e7e36c67e507 : SUCCESS in 41m 58s\n- tempest-integrated-placement https://zuul.opendev.org/t/openstack/build/8e080b7cbfae4335afbae497250bf06c : SUCCESS in 1h 43m 45s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/6e896549853542d8871912f01d9c70c4 : SUCCESS in 1h 00m 01s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/f2cbcb92b09e42e8b3e72ebd2576cd1f : SUCCESS in 14m 42s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/167e951af59140aa864819db645f79a4 : SUCCESS in 4m 52s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/7582bf9bac954751aca40ee03aa8a64a : SUCCESS in 4m 58s\n- openstack-tox-py312 https://zuul.opendev.org/t/openstack/build/72496ff1963c43fdb9e22116295952c1 : SUCCESS in 3m 28s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/4721d200b6f34bf7a644d6601682e743 : SUCCESS in 9m 51s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/d9e03870874f45728948849a5ff95f77 : SUCCESS in 3m 03s\n- openstack-tox-functional-py39 https://zuul.opendev.org/t/openstack/build/0e4ef5c29ad54f21ba23d597d33955e9 : SUCCESS in 7m 25s\n- openstack-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/0dd0181567d549b284f9a09930d868ad : SUCCESS in 7m 01s\n- placement-nova-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/f47a5cb72caa476e8a74114143af3b59 : SUCCESS in 21m 39s\n- placement-nested-perfload https://zuul.opendev.org/t/openstack/build/1116c7cdc81a4be98b43080226f4810a : SUCCESS in 17m 13s (non-voting)\n- placement-perfload https://zuul.opendev.org/t/openstack/build/bc6b13323fbf4b78a56b858ded425c46 : FAILURE in 2m 44s (non-voting)\n- tempest-integrated-placement-ubuntu-jammy https://zuul.opendev.org/t/openstack/build/ca8f377656bd4d6d9d4b149578d64b06 : SUCCESS in 1h 18m 42s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/90cc49096a4041289e8eac7ef44127ae : SUCCESS in 52m 09s","accounts_in_message":[],"_revision_number":1},{"id":"9c1429bb9709bb03fe38e1ad1f56294a24cd88ee","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-01-10 10:24:57.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"b2186208670a625b236e018d35d7819b7e85fe4e","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-01-10 12:18:07.000000000","message":"Patch Set 1: Verified+2\n\nBuild succeeded (gate pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/829b02f030774a59a0472cb8a2e45bdd\n\n- grenade https://zuul.opendev.org/t/openstack/build/8bf3e6c7c9ce4b0a8850ce78eb09d40e : SUCCESS in 31m 55s\n- tempest-integrated-placement https://zuul.opendev.org/t/openstack/build/050853ad0fc74724a66095310cad7021 : SUCCESS in 1h 48m 42s\n- grenade-skip-level-always https://zuul.opendev.org/t/openstack/build/142e65958ad240e6bf8cf08883dcb463 : SUCCESS in 55m 43s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/ca68eaa3e043415882a305e128add442 : SUCCESS in 1h 02m 51s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/cb40234a79a64caa9181294eff1241e0 : SUCCESS in 4m 44s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/5a53a2f04ac14e509ceccecc934923b6 : SUCCESS in 4m 38s\n- openstack-tox-py312 https://zuul.opendev.org/t/openstack/build/f50f5bfa59da4941a142ce765a00c520 : SUCCESS in 5m 10s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/5f79f2d1bc714760b02380e5b8531794 : SUCCESS in 10m 00s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/186d0a84a3384ff18c2ab913647a0eab : SUCCESS in 5m 29s\n- openstack-tox-functional-py39 https://zuul.opendev.org/t/openstack/build/c1b20ad004c34babb5e941b159112645 : SUCCESS in 5m 40s\n- openstack-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/6ad8422951a94e299e2e7a96b9caa017 : SUCCESS in 5m 38s\n- placement-nova-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/dbdc50b912e147bca37c7d8d080095b7 : SUCCESS in 21m 18s\n- tempest-integrated-placement-ubuntu-jammy https://zuul.opendev.org/t/openstack/build/645c656cce494fb99c887022a540f8d9 : SUCCESS in 1h 25m 44s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/5cf3cf9fdf9e40f8889324fb6fc975ec : SUCCESS in 40m 21s","accounts_in_message":[],"_revision_number":1},{"id":"bc586d7900a4279718a12cca9326fb2459e30363","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-01-10 12:18:07.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":1},{"id":"8b177a7af54c6d44e1ab10355c5b0f3955184e2a","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-01-10 12:18:57.000000000","message":"Patch Set 1:\n\nBuild succeeded (promote pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/94be8df8accc49a992a31ca5ae6a27d8\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/ee31f0a72e104a599953863543c70333 : SUCCESS in 39s\n- promote-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/278316915fec4371a0eef8380a6e1d89 : SUCCESS in 38s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"e8c6ce4913e9efe4ab08f181101f2be3483612b6","revisions":{"e8c6ce4913e9efe4ab08f181101f2be3483612b6":{"kind":"REWORK","_number":1,"created":"2025-10-16 14:24:38.000000000","uploader":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"ref":"refs/changes/22/964222/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/22/964222/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/22/964222/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/22/964222/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/22/964222/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/22/964222/1"}}},"commit":{"parents":[{"commit":"e55f14229d103d262e19e7f626cebc4d5e4db788","subject":"Reproduce GET a_c slowness bug/2126751","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/e55f14229d103d262e19e7f626cebc4d5e4db788"}]}],"author":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2025-10-02 09:40:31.000000000","tz":120},"committer":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2025-10-16 14:24:31.000000000","tz":120},"subject":"Prune a_c search space by invalid prefixes","message":"Prune a_c search space by invalid prefixes\n\nAssume we have 8 RPs with 1 resource, and we request 8 groups\nwith 1 resource each.\nThe full candidate matrix for a single provider tree (compute node)\nby satisfying each group independently (G is request group, R is RP):\n\n  G0: [R0, R1,..., R7] # G0 can be fulfilled from R0, R1, ..., R7\n  G1: [R0, R1,..., R7]\n  ...\n  G7: [R0, R1,..., R7]\n\nPlacement needs to satisfy every group in the request so it\ncreates all the possible combinations (a Cartesian product) of the\nindividual group fulfilments and checks if they are valid, i.e if\nthere are no two or more groups trying to use the same single piece\nof resource.\nThe product looks like\n(C is candidate, G0-R0 means G0 group satisfied from R0 RP):\n\n  C0: [G0-R0, G1-R0, ..., G7-R0] # invalid, R0 has 1 res but C0 needs 8\n  C1: [G0-R0, G2-R0, ..., G7-R1] # invalid, R0 has 1 res but C1 needs 7\n  ...\n  Cx: [G0-R0, G1-R1, ..., G7-R7] # valid, each Rx has 1 res and\n                                 # Cx ask form 1 res each\n\nFrom this picture it is clear that:\n\n* There are a lot more invalid candidates than valid ones. Actually\n  in this specific scenario the total number of candidates are\n  8^8 ~ 16M. The valid candidates are 8! ~ 40K. Finding the valid ones\n  by blindly searching all possible ones are scaling very badly as\n  exponential grows faster than factorial. I.e. valid candidates will be\n  farther apart from each other in the search space.\n\n* There is a structure within and across the candidates. E.g. If we\n  know that C0 is invalid already because of G0-R0 and G1-R0 tries\n  to consume the same singe resource from R0 then:\n\n  * We don\u0027t need to check how G2 is mapped in C0 as that mapping cannot\n    change the fact the whole candidate is invalid.\n\n  * We know that every candidate that starts with G0-R0, G1-R0 are\n    invalid for the same reason and we don\u0027t need to generate and\n    test them\n\nThe latter means that C1...Cy (y \u003c x - 1) can be pruned out from the\nsearch space after C0 is tested. This is a lot of candidates. In the\nabove natural ordering of the product generation algorithm it is\nactually more than 40K candidates that we can skip after just testing\nC0 alone. When we reach Cx, the first valid candidate, the algo already\npruned out more than 300k candidates.\n\nAfter this patch the above pruning logic is not turned on automatically\nbut can be enabled via the config option:\n\n  [workarounds]\n  optimize_for_wide_provider_trees \u003d true\n\nThe implementation consists of the following pieces:\n\nA recursive product generator algorithm that calls a function on each\npartial candidate and if that function signals that the partial\ncandidate is invalid then the algorithm does skips any candidate that\nhas the same partial candidate prefix.\n\nThe recursion does a tree traversal to find all partial prefixes.\nWith the above G0-G8, RP0, RP8 example the start of the traversal\nlooks like:\n1. partial product G0-RP0, this does not exceed capacity so recurse\n2. partial product G0-RP0, G1-RP0, this exceeds capacity so do not\n   recurse but try another RP on this level.\n3. partial product G0-RP0, G1-RP1, this does not exceeds capacity so\n   recurse.\n4. partial product G0-RP0, G1-RP1, G2-RP0, this exceeds capacity so\n   do not recurse but try another RP on this level\n...\n\nWithout the optimization Placement uses the logic\n\n        areq \u003d _consolidate_allocation_requests(areq_list, rw_ctx)\n        if rw_ctx.exceeds_capacity(areq)\n            continue\n\non all products after it was generated. The\n_consolidate_allocation_requests folds the individual\nAllocationRequestResource object in the product into a single\nallocation. This has a side effect on some of the ARRs so the logic does\ncopy the affected ARRs. This is expensive especially if we want to call\nit on every partial product as well. However if we only want to check\nthe capacity we don\u0027t need to fold the ARRs we just need to sum the\namount each ARR hold and the check that against the capacity. So\n_exceeds_capacity() was added to do this optimized, side effect and copy\nfree, capacity check when the optimization is enabled.\n\nWhen a valid product is generated _consolidate_allocation_requests still\nneeds to be called to get the folded AllocationRequest in any case as\nthe caller of _merge_candidates expects such structure. But the final\nrw_ctx.exceeds_capacity can we skipped if the optimization is enabled.\n\nThe depth of the recursion is equal to the number of iterables passed to\nthe product call. It can be seen by the fact that each level of\nrecursion appends a new item to the partial product and when the length\nof the partial product equals to the number of iterables then we have a\nfull product and the algo yields. The default python recursion limit is\n1000 so we are not really limited by that as that means we could handle\n~ 990 iterables, meaning an allocation candidate query with 990 request\ngroups. The limiting factor of this algorithm is not recursion depth but\nexecution time.\n\nGemini 2.5 pro was used to put together the generic Cartesian product\nalgorithm.\n\nCo-Authored-by: Sean Mooney \u003cwork@seanmooney.info\u003e\nAssisted-By: gemini-2.5-pro\nCloses-Bug: #2126751\nChange-Id: I13ab83a165c229ae57876df4570e8af25221a45e\nSigned-off-by: Balazs Gibizer \u003cgibi@redhat.com\u003e\n(cherry picked from commit 5b73b980d0f022de2855480f57c9d5f04a7a4712)\n(cherry picked from commit 192f62baada531b8ae96a2e6eac07506034dbdc3)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/e8c6ce4913e9efe4ab08f181101f2be3483612b6"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/e8c6ce4913e9efe4ab08f181101f2be3483612b6"}]},"branch":"refs/heads/stable/2025.1"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"CLOSED","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY","applied_by":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"}},{"label":"Workflow","status":"MAY","applied_by":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"}},{"label":"Review-Priority","status":"MAY"}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dMAX"],"failing_atoms":["label:Verified\u003dMIN"],"atom_explanations":{}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dMAX"],"failing_atoms":["label:Code-Review\u003dMIN"],"atom_explanations":{}}},{"name":"Review-Priority","description":"Review Priority","status":"NOT_APPLICABLE","is_legacy":false,"applicability_expression_result":{"fulfilled":false,"status":"FAIL"},"submittability_expression_result":{"expression":"is:true","fulfilled":true,"status":"NOT_EVALUATED","passing_atoms":[],"failing_atoms":[],"atom_explanations":{}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Workflow\u003dMAX"],"failing_atoms":["label:Workflow\u003dMIN"],"atom_explanations":{}}}]}
