)]}'
{"id":"openstack%2Fnova~984522","triplet_id":"openstack%2Fnova~master~Ie28f031f9c3b8d3db3851c1c2f9e51a72dc56e6b","project":"openstack/nova","branch":"master","topic":"bug/2141722","attention_set":{"16207":{"account":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"last_update":"2026-04-14 12:17:29.000000000","reason":"Someone else replied on the change"}},"removed_from_attention_set":{},"hashtags":[],"change_id":"Ie28f031f9c3b8d3db3851c1c2f9e51a72dc56e6b","subject":"Fix os-simple-tenant-usage pagination with duplicate instance_extra","status":"NEW","created":"2026-04-14 09:31:08.000000000","updated":"2026-04-17 16:25:35.000000000","submit_type":"MERGE_IF_NECESSARY","mergeable":true,"submittable":false,"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"d639a4e9adb1647aa3d330fc4fca5ecb2c16c409","_number":984522,"virtual_id_number":984522,"owner":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"actions":{},"labels":{"Verified":{"recommended":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"tag":"autogenerated:zuul:check","value":1,"date":"2026-04-17 16:10:45.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":"","value":1,"default_value":0,"optional":true},"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_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":{"all":[{"_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,"permitted_voting_range":{"min":0,"max":1},"_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":{"CC":[{"_account_id":14384,"name":"Quobyte CI","email":"openstack-ci-external@quobyte.com","username":"quobyteci","tags":["SERVICE_USER"]},{"_account_id":34420,"name":"openstack lightbits","display_name":"Lightbits CI","email":"openstack@lightbitslabs.com","username":"openstack_lightbits"}],"REVIEWER":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2026-04-14 10:10:45.000000000","updated_by":{"_account_id":14384,"name":"Quobyte CI","email":"openstack-ci-external@quobyte.com","username":"quobyteci","tags":["SERVICE_USER"]},"reviewer":{"_account_id":14384,"name":"Quobyte CI","email":"openstack-ci-external@quobyte.com","username":"quobyteci","tags":["SERVICE_USER"]},"state":"CC"},{"updated":"2026-04-14 12:17:22.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":"2026-04-14 12:17:29.000000000","updated_by":{"_account_id":34420,"name":"openstack lightbits","display_name":"Lightbits CI","email":"openstack@lightbitslabs.com","username":"openstack_lightbits"},"reviewer":{"_account_id":34420,"name":"openstack lightbits","display_name":"Lightbits CI","email":"openstack@lightbitslabs.com","username":"openstack_lightbits"},"state":"CC"}],"messages":[{"id":"56005c579c33ed39bca96020aa1cf66985741553","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"date":"2026-04-14 09:31:08.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"5e4b44f869204bed298eb48f904ac45b6afa24e0","author":{"_account_id":14384,"name":"Quobyte CI","email":"openstack-ci-external@quobyte.com","username":"quobyteci","tags":["SERVICE_USER"]},"date":"2026-04-14 10:10:45.000000000","message":"Patch Set 1:\n\nBuild Successful \n\n* quobyteci:  nova_quobyteci : SUCCESS, logs at: https://oscilogs.quobyte.com/logs/Ie28f031f9c3b8d3db3851c1c2f9e51a72dc56e6b .","accounts_in_message":[],"_revision_number":1},{"id":"f64d5a5e7ff5e9a5cbfcd834abae66a35849ed0f","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-04-14 12:17:22.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/3ec8a147c3964afd90957420e0a8534b\n\n- grenade-skip-level-always https://zuul.opendev.org/t/openstack/build/5d7c2f28b23149d3afca56a1aac9985c : SUCCESS in 1h 09m 31s\n- tempest-integrated-compute https://zuul.opendev.org/t/openstack/build/f9481428fde14724a2f46bbab65b8407 : SUCCESS in 2h 03m 45s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/9b0b7d4641cf4bac93eb6592939d44c3 : SUCCESS in 1h 09m 10s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/1cb487cfb81a4d17b73872ded9d14d7c : SUCCESS in 1h 13m 34s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/fc152f9862ee4c7d93e5b74e39503631 : SUCCESS in 7m 59s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/317d5d6e22d84e53b3e64268edfe41c1 : SUCCESS in 23m 17s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/10d60fbf85004419aae1fd661d91df87 : SUCCESS in 14m 11s\n- openstack-tox-py314 https://zuul.opendev.org/t/openstack/build/db64e34777464a68bfba141b30ba3965 : SUCCESS in 21m 25s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/5572aaae093c4905ad050016d5a73c60 : SUCCESS in 12m 55s\n- ironic-tempest-bios-ipmi-autodetect https://zuul.opendev.org/t/openstack/build/3c0ccd8db6ed43aab34d5aca8ac405aa : SUCCESS in 1h 10m 34s (non-voting)\n- nova-ceph-multistore https://zuul.opendev.org/t/openstack/build/f388e3290cbe49279c7ab635322a2a73 : SUCCESS in 1h 44m 44s\n- nova-live-migration https://zuul.opendev.org/t/openstack/build/56b0ef3e6e7c42a4bef41e317f82171b : SUCCESS in 56m 06s\n- nova-vtpm https://zuul.opendev.org/t/openstack/build/644a64a9cc8149308858e3e1f94cdca0 : SUCCESS in 34m 04s\n- nova-graceful-shutdown https://zuul.opendev.org/t/openstack/build/df8a34eb2446410eb5ef5a9828ba0f1d : SUCCESS in 1h 01m 38s\n- nova-live-migration-ceph https://zuul.opendev.org/t/openstack/build/ac3250634bcc4512908c6a8b6f761bc7 : SUCCESS in 1h 00m 10s\n- nova-multi-cell https://zuul.opendev.org/t/openstack/build/86b8af0ffe7d49f2966df6e5c6b4cb62 : SUCCESS in 2h 29m 00s\n- nova-next https://zuul.opendev.org/t/openstack/build/4e5d9200caeb4e25b6a582afd8f83f7d : SUCCESS in 2h 39m 02s\n- nova-alt-configurations https://zuul.opendev.org/t/openstack/build/c2820be21528417690ddc904b98b7bd5 : SUCCESS in 52m 07s\n- nova-tox-validate-backport https://zuul.opendev.org/t/openstack/build/7a1d9ce28fb049db95658c802e55283e : SUCCESS in 5m 37s (non-voting)\n- nova-tox-functional-py310 https://zuul.opendev.org/t/openstack/build/30145fb56c42459da57718d16102a773 : SUCCESS in 29m 32s\n- nova-tox-functional-py313 https://zuul.opendev.org/t/openstack/build/38775d62fb2b4ad886bd9f04fd4a1ceb : SUCCESS in 28m 19s\n- nova-grenade-multinode https://zuul.opendev.org/t/openstack/build/c3f81a0cedb94699ae0e0d54676c6264 : SUCCESS in 1h 35m 39s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/98e37b6b6f644f0ebed68cc0d75878ce : SUCCESS in 59m 14s\n- cyborg-tempest https://zuul.opendev.org/t/openstack/build/dada7665077744b7b1af2760a1597a98 : SUCCESS in 33m 26s (non-voting)\n- barbican-tempest-plugin-simple-crypto https://zuul.opendev.org/t/openstack/build/e2f41fd0283244cfba94a1515ed87d6a : SUCCESS in 37m 56s (non-voting)\n- nova-tox-py313-threading https://zuul.opendev.org/t/openstack/build/ad0f84b505024d328762bcfe05e402ae : SUCCESS in 14m 49s","accounts_in_message":[],"_revision_number":1},{"id":"26087eb47797e46e4fc75210872f2297c4d03443","tag":"autogenerated:jenkins-gerrit-trigger","author":{"_account_id":34420,"name":"openstack lightbits","display_name":"Lightbits CI","email":"openstack@lightbitslabs.com","username":"openstack_lightbits"},"date":"2026-04-14 12:26:52.000000000","message":"Patch Set 1:\n\nBuild succeeded. log path: ${LOG_PATH}\nLeave a comment with","accounts_in_message":[],"_revision_number":1},{"id":"814139422effe263b17492c8e45ed2de4dbb6dcd","tag":"autogenerated:zuul:check-arm64","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-04-14 12:38:26.000000000","message":"Patch Set 1:\n\nBuild succeeded (ARM64 pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/eb8b6a09edcc4e5e8b0240376548599d\n\n- openstack-tox-py310-arm64 https://zuul.opendev.org/t/openstack/build/593b7ddc967647e2a72469daca26f825 : SUCCESS in 17m 13s (non-voting)\n- openstack-tox-py313-arm64 https://zuul.opendev.org/t/openstack/build/178f95016971499a9460372977c94542 : SUCCESS in 12m 39s (non-voting)\n- openstack-tox-py314-arm64 https://zuul.opendev.org/t/openstack/build/def94776032f47f980f5a40227f3b6fb : SUCCESS in 21m 35s (non-voting)","accounts_in_message":[],"_revision_number":1},{"id":"47c451b42224a76d1c74b64de81e988bd906a412","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"date":"2026-04-17 13:24:41.000000000","message":"Uploaded patch set 2.\n\nOutdated Votes:\n* Verified+1 (copy condition: \"NEVER\")\n","accounts_in_message":[],"_revision_number":2},{"id":"8bf2633493204aae15c1aa760151875c6aba07ae","tag":"autogenerated:zuul:check-arm64","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-04-17 13:55:37.000000000","message":"Patch Set 2:\n\nBuild succeeded (ARM64 pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/417ae587079c4b59a764bd9f7e6aac29\n\n- openstack-tox-py310-arm64 https://zuul.opendev.org/t/openstack/build/7f56b30d9331491f8199661ad085787b : SUCCESS in 15m 51s (non-voting)\n- openstack-tox-py313-arm64 https://zuul.opendev.org/t/openstack/build/e930c7caaedb4717b7cda4b49d9cbaef : SUCCESS in 13m 47s (non-voting)\n- openstack-tox-py314-arm64 https://zuul.opendev.org/t/openstack/build/9a89012a76a546848495c3ed92ea03f7 : SUCCESS in 28m 36s (non-voting)","accounts_in_message":[],"_revision_number":2},{"id":"40855068f7cf9cd6989f2ba18cf893a98186e3f4","author":{"_account_id":14384,"name":"Quobyte CI","email":"openstack-ci-external@quobyte.com","username":"quobyteci","tags":["SERVICE_USER"]},"date":"2026-04-17 14:03:21.000000000","message":"Patch Set 2:\n\nBuild Successful \n\n* quobyteci:  nova_quobyteci : SUCCESS, logs at: https://oscilogs.quobyte.com/logs/Ie28f031f9c3b8d3db3851c1c2f9e51a72dc56e6b .","accounts_in_message":[],"_revision_number":2},{"id":"7ad5e30cadfd3c3cac4c3a62bd6adc405d5874f0","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-04-17 16:10:45.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/ed2499ac3ebb4f428006a383b5a02f18\n\n- grenade-skip-level-always https://zuul.opendev.org/t/openstack/build/31092b5614984b3baccd200f3ea400fc : SUCCESS in 1h 05m 31s\n- tempest-integrated-compute https://zuul.opendev.org/t/openstack/build/cbb143a7f50a4b18ae969582c52b0e2a : SUCCESS in 1h 39m 29s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/f529e9cc07614578a5dd26f4c3bcea9a : SUCCESS in 1h 13m 34s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/a66260dd97fe4d30b590dd7d72b8ce2c : SUCCESS in 1h 16m 04s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/06878fb3feab41e693ed35f17b879bd6 : SUCCESS in 7m 33s\n- openstack-tox-py311 https://zuul.opendev.org/t/openstack/build/c09cb457949a4ad09bc84b677cc4c1f6 : SUCCESS in 15m 44s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/bdbef217cdf14f00b2660ea4b0a7381f : SUCCESS in 8m 05s\n- openstack-tox-py314 https://zuul.opendev.org/t/openstack/build/e0d5647a184a40cdb6de35a908d0d7c0 : SUCCESS in 21m 27s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/1e7296db188549c0883a92063e116b6b : SUCCESS in 13m 01s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/3060c91160784ec0a8c438acd4bebc30 : SUCCESS in 32m 31s\n- ironic-tempest-bios-ipmi-autodetect https://zuul.opendev.org/t/openstack/build/8371adcdd8e54d318eb1349848ea718a : SUCCESS in 32m 25s (non-voting)\n- nova-ceph-multistore https://zuul.opendev.org/t/openstack/build/d94a5f2b1808436fb4028593a8185477 : SUCCESS in 1h 34m 06s\n- nova-live-migration https://zuul.opendev.org/t/openstack/build/68e79835b1de4f07b18158da954a5c3d : SUCCESS in 58m 01s\n- nova-vtpm https://zuul.opendev.org/t/openstack/build/9c3acafe76b64135a0d90d3858df290c : SUCCESS in 39m 47s\n- nova-graceful-shutdown https://zuul.opendev.org/t/openstack/build/d91403dcd9b14fa0a467149cff880d0f : SUCCESS in 1h 08m 30s\n- nova-live-migration-ceph https://zuul.opendev.org/t/openstack/build/65e1d2c36c104f9b9356eb31dee7dfc6 : SUCCESS in 25m 39s\n- nova-multi-cell https://zuul.opendev.org/t/openstack/build/e262131c8a5a4d11808ee0b9e8230970 : SUCCESS in 2h 37m 18s\n- nova-next https://zuul.opendev.org/t/openstack/build/70fcffc5d65649c096704e5f8d3527af : SUCCESS in 2h 18m 58s\n- nova-alt-configurations https://zuul.opendev.org/t/openstack/build/031ce47f4f154278acf42f0c7f94f1a8 : SUCCESS in 50m 53s\n- nova-tox-validate-backport https://zuul.opendev.org/t/openstack/build/36967e4e81b143b7835f2767fcebf469 : SUCCESS in 5m 43s (non-voting)\n- nova-tox-functional-py310 https://zuul.opendev.org/t/openstack/build/08c17120490747a2b003e0ff774bab8b : SUCCESS in 38m 48s\n- nova-tox-functional-py313 https://zuul.opendev.org/t/openstack/build/b6d321cbc23c49d18d1dc25fdba59291 : SUCCESS in 27m 15s\n- nova-grenade-multinode https://zuul.opendev.org/t/openstack/build/b3a4f3022cbe4f178e697d73b22b2140 : SUCCESS in 1h 45m 54s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/e5bdae1839cd4260bf7078f1ebc94fd0 : SUCCESS in 57m 11s\n- cyborg-tempest https://zuul.opendev.org/t/openstack/build/133896725a4743b1be41ca4d1f53e555 : SUCCESS in 24m 11s (non-voting)\n- barbican-tempest-plugin-simple-crypto https://zuul.opendev.org/t/openstack/build/02aba63a482043da8a74bae0f38dab68 : SUCCESS in 19m 02s (non-voting)\n- nova-tox-py313-threading https://zuul.opendev.org/t/openstack/build/1c6fe77e1ceb420a919d6b8dc1dbe258 : SUCCESS in 12m 07s","accounts_in_message":[],"_revision_number":2},{"id":"d639a4e9adb1647aa3d330fc4fca5ecb2c16c409","tag":"autogenerated:jenkins-gerrit-trigger","author":{"_account_id":34420,"name":"openstack lightbits","display_name":"Lightbits CI","email":"openstack@lightbitslabs.com","username":"openstack_lightbits"},"date":"2026-04-17 16:25:35.000000000","message":"Patch Set 2:\n\nBuild succeeded. log path: ${LOG_PATH}\nLeave a comment with","accounts_in_message":[],"_revision_number":2}],"current_revision_number":2,"current_revision":"5ec49e5240b66e8afaa348c2a7bf71c68234032b","revisions":{"e213465213d55b08a88adb8391b55fb5f4e56870":{"kind":"REWORK","_number":1,"created":"2026-04-14 09:31:08.000000000","uploader":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"ref":"refs/changes/22/984522/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/nova","ref":"refs/changes/22/984522/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/nova refs/changes/22/984522/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/nova refs/changes/22/984522/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/nova refs/changes/22/984522/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/nova refs/changes/22/984522/1"}}},"commit":{"parents":[{"commit":"4618443b6ebded49ba1d2a956d52d988b91bcec3","subject":"Add reproducer for bug #2141722","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/4618443b6ebded49ba1d2a956d52d988b91bcec3"}]}],"author":{"name":"René Ribaud","email":"rribaud@redhat.com","date":"2026-04-13 17:40:28.000000000","tz":120},"committer":{"name":"René Ribaud","email":"rribaud@redhat.com","date":"2026-04-13 20:02:46.000000000","tz":120},"subject":"Fix os-simple-tenant-usage pagination with duplicate instance_extra","message":"Fix os-simple-tenant-usage pagination with duplicate instance_extra\n\nThe os-simple-tenant-usage API (microversion 2.40+) returns fewer\ninstances than the requested limit when the instance_extra table\ncontains duplicate records for a single instance UUID.\n\nThe root cause is that instance_get_active_by_window_joined() uses\njoinedload() for the instance_extra relationship, which creates a\nLEFT OUTER JOIN. When duplicate instance_extra rows exist, the JOIN\nproduces multiple SQL rows per instance. The SQL LIMIT is then\napplied to these multiplied rows, and SQLAlchemy deduplicates back\nto unique instances, resulting in fewer instances than requested.\n\nFix this by switching from joinedload to selectinload for the\ninstance_extra relationship. selectinload loads the extras in a\nseparate query (SELECT ... WHERE instance_uuid IN (...)), so LIMIT\nis applied only to instance rows in the main query.\n\nCloses-Bug: #2141722\nAssisted-By: Claude-Code opus 4.6\nChange-Id: Ie28f031f9c3b8d3db3851c1c2f9e51a72dc56e6b\nSigned-off-by: René Ribaud \u003crene.ribaud@gmail.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/e213465213d55b08a88adb8391b55fb5f4e56870"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/e213465213d55b08a88adb8391b55fb5f4e56870"}]},"branch":"refs/heads/master"},"5ec49e5240b66e8afaa348c2a7bf71c68234032b":{"kind":"REWORK","_number":2,"created":"2026-04-17 13:24:41.000000000","uploader":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"ref":"refs/changes/22/984522/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/nova","ref":"refs/changes/22/984522/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/nova refs/changes/22/984522/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/nova refs/changes/22/984522/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/nova refs/changes/22/984522/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/nova refs/changes/22/984522/2"}}},"commit":{"parents":[{"commit":"15a5395994b511d6611c6b2f1f037928907cd439","subject":"Add reproducer for bug #2141722","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/15a5395994b511d6611c6b2f1f037928907cd439"}]}],"author":{"name":"René Ribaud","email":"rribaud@redhat.com","date":"2026-04-13 17:40:28.000000000","tz":120},"committer":{"name":"René Ribaud","email":"rribaud@redhat.com","date":"2026-04-17 13:24:01.000000000","tz":120},"subject":"Fix os-simple-tenant-usage pagination with duplicate instance_extra","message":"Fix os-simple-tenant-usage pagination with duplicate instance_extra\n\nThe os-simple-tenant-usage API (microversion 2.40+) returns fewer\ninstances than the requested limit when the instance_extra table\ncontains duplicate records for a single instance UUID.\n\nThe root cause is that instance_get_active_by_window_joined() uses\njoinedload() for the instance_extra relationship, which creates a\nLEFT OUTER JOIN. When duplicate instance_extra rows exist, the JOIN\nproduces multiple SQL rows per instance. The SQL LIMIT is then\napplied to these multiplied rows, and SQLAlchemy deduplicates back\nto unique instances, resulting in fewer instances than requested.\n\nFix this by switching from joinedload to selectinload for the\ninstance_extra relationship. selectinload loads the extras in a\nseparate query (SELECT ... WHERE instance_uuid IN (...)), so LIMIT\nis applied only to instance rows in the main query.\n\nCloses-Bug: #2141722\nAssisted-By: Claude-Code opus 4.6\nChange-Id: Ie28f031f9c3b8d3db3851c1c2f9e51a72dc56e6b\nSigned-off-by: René Ribaud \u003crene.ribaud@gmail.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/5ec49e5240b66e8afaa348c2a7bf71c68234032b"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/nova/commit/5ec49e5240b66e8afaa348c2a7bf71c68234032b"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"OK","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY"},{"label":"Workflow","status":"MAY"},{"label":"Review-Priority","status":"MAY"}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Verified\u003dMAX","label:Verified\u003dMIN"],"atom_explanations":{"label:Verified\u003dMAX":"","label:Verified\u003dMIN":""}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Code-Review\u003dMAX","label:Code-Review\u003dMIN"],"atom_explanations":{"label:Code-Review\u003dMAX":"","label:Code-Review\u003dMIN":""}}},{"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":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Workflow\u003dMAX","label:Workflow\u003dMIN"],"atom_explanations":{"label:Workflow\u003dMAX":"","label:Workflow\u003dMIN":""}}}]}
