)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"bd641061cfa10ea114fc02e5cdbe19cfd7a7b855","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"40b15a84_7677355e","updated":"2023-01-16 15:23:04.000000000","message":"Hi Sahid. There is a patch in progress that supersedes this one [1]. I think we should work on [1] that, according to the developer, improves the SQL query.\n\n[1]https://review.opendev.org/c/openstack/neutron-lib/+/817459","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"},{"author":{"_account_id":33910,"name":"Tyler Stachecki","display_name":"Tyler Stachecki","email":"tstachecki@bloomberg.net","username":"tjstachecki"},"change_message_id":"95b9b52786060ed251fda88a721f5b80cd218dfc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e2d210d0_619b3d56","updated":"2023-01-18 05:37:52.000000000","message":"This does not work for all cases.\n\ne.g., Let\u0027s saw I am the admin and own network foo, which is not shared. All other networks in the cloud are also not shared. I then run \u0027osc network list --share\u0027 as the admin on the main branch: there are no results returned.\n\nOnce I apply your PS, the same query returns the foo network since the admin owns it... which changes the result set from before.\n\nYou can see similar functional failures from this PS in the Neutron tempest runs:\nhttps://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_41d/870557/1/check/neutron-tempest-plugin-linuxbridge/41dfa34/testr_results.html\n\nSetting aside the functional changes, I have a rather complex test cloud loaded with many RBACs and projects in a use case that is unique to us - this PS results in a 90 sec runtime for \u0027osc network list --share\u0027 whereas main is 3.5 seconds.\n\nThis is all not to discourage you... my first attempt at fixing a similar performance issue we faced for our use case was met with initial success for our use case, but had similar regressions for other cases that did not matter to us.\n\nThis section of code is so tricky as it serves so many purposes...!","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"baf9d7ba1cf0b23b5ebbefb1178654fbacfae7f8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"68ecd3ae_e110f804","updated":"2023-01-19 16:42:03.000000000","message":"Tyler, Rodolpho I have made mistake on the change that I wanted to make, the one is on neutron, not neutron-lib...\n\nhttps://review.opendev.org/c/openstack/neutron/+/871113","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"038601b079b845d4ebcf606a6179aa314e915be6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"269669a5_0f2d43c0","updated":"2023-01-23 11:40:06.000000000","message":"https://review.opendev.org/c/openstack/neutron/+/871113","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"7adaf247ab1b49cc03fcacb502143ada87ac244f","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b9d5e3cc_66889980","in_reply_to":"303f952b_6c7a0973","updated":"2023-01-19 10:51:18.000000000","message":"It’s not about being a lawyer. The change that you want to make is completely changing the way that we use the current model. RBACs are in relation with almost all the resources.\n\nIt may improve performances for your case but can seriously decrease performance for other setups.\n\nWhen users upgrade their versions they will have no choice to go back.\n\nIt’s quite difficult to test this as some queries are in relation to the number of hosts.\n\nSo yes I’m asking how you understand the whole change that you are making and I more feel more confident on improving the current model slowly as we can already see some issues.","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ac8ac64309f87ce0e40985c4fcb56d6b19d90617","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d2bae222_1e102fc4","in_reply_to":"40b15a84_7677355e","updated":"2023-01-17 12:33:00.000000000","message":"Hello Rodolfo, let me add Tyler. This one should be a complementary even with the work in progress on [1]. But let\u0027s double check with him.\n\nAbout [1] It would be great if we could have a bit more details regarding performance improvement that this is going to give, since looks like we add complexity. I\u0027m bit scary that some improvement in the current model would have fixed the problem with less complexity.\n\nGuys, should not we try to add some performances testing in our CI? At least to ensure that pgsql and mysql still behave with the same way and to ensure what we do with the model really improve perf?","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"f1d99f4f13293a22ffbdda40c8d26a9a50131432","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d302c9fb_e9e06bee","in_reply_to":"68ecd3ae_e110f804","updated":"2023-01-19 16:46:46.000000000","message":"I\u0027m apologies, I wanted to say Rodolfo... I will take care avoiding this misspelling","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"aa00dc56d03ce5f0d069a20c9ac756c6bc542086","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"fe396cd7_63547616","in_reply_to":"e2d210d0_619b3d56","updated":"2023-01-18 09:57:28.000000000","message":"\u003e e.g., Let\u0027s saw I am the admin and own network foo, which is not shared. All other networks in the cloud are also not shared. I then run \u0027osc network list --share\u0027 as the admin on the main branch: there are no results returned.\n\nThank you, this case can certainly be addressed with a minor change.\n\n\u003e Setting aside the functional changes, I have a rather complex test cloud loaded with many RBACs and projects in a use case that is unique to us - this PS results in a 90 sec runtime for \u0027osc network list --share\u0027 whereas main is 3.5 seconds.\n\nIt\u0027s an interesting point. The case with --share means we have to scan the whole rbacs list, right? It\u0027s true that my proposal would not bring any improvement. Could you explain (if you have a moment) how your solution is helping us for both cases (with and without --share)?","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"},{"author":{"_account_id":33910,"name":"Tyler Stachecki","display_name":"Tyler Stachecki","email":"tstachecki@bloomberg.net","username":"tjstachecki"},"change_message_id":"3794024efb68b07442e813add3c2436135b174c6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"303f952b_6c7a0973","in_reply_to":"fe396cd7_63547616","updated":"2023-01-18 17:08:18.000000000","message":"I\u0027m not a DBA (nor a lawyer!) -- but I think the large win from my PS comes from the elimination of the outer join between RBACs and objects such as networks. With an outer join, the result created is often large and I think it prevents indexes from being used under certain circumstances, which results in table scans across large anonymous inner queries -- where the outer join is usually present.\n\nSo, in the case of needing to determine which networks are shared, the filter being applied in this context for my PS is going only against RBACs and NOT objects which don\u0027t have them (again, as there is no outer join). Moreover, as the filter is directly against the RBACs, indexes such as \u0027rbacs.action\u0027 can be leveraged to avoid a scan.","commit_id":"2c853b805676282b7b8ece29cf39a587c2f6b32c"}]}
