Using "joined" relation on tags can cause slow query times in certain situations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Miro Tomaska |
Bug Description
We have recentely changed[1] the Tag class relationship technique to joined. The main reason behind it was to reduce the amount of SELECT logs during testing. With this change we were also consistant with other models loading technique(see [1] commit message).
However, we have recently discovered a corner case where some customers(through automation) would define hundreds of tags for a instance port accross a very large deployment. This essentially resulted in a massive queries when trying to retrieve a server or port data via neutron API. We have seen as 90seconds delay which caused timeouts and other side effects on the deployment.
For this reason I am going to propose revert of this change to favor performance over reducing size of SELECT log files during testing.
Side note, there is also an option to use 'selectin` option[2], but given that the `selectin` was in its infancy during the sqalchemy 1.3 and 1.4, I will prefer to use the old stable 'subqeury'. We can switch to `selectin` with sqalchemy 2.0
[1] https:/
[2] https:/
Changed in neutron: | |
importance: | Undecided → High |
assignee: | nobody → Miro Tomaska (mtomaska) |
tags: | added: db |
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/921566
Review: https:/