yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #94069
[Bug 2068761] [NEW] Using "joined" relation on tags can cause slow query times in certain situations
Public bug reported:
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://review.opendev.org/c/openstack/neutron/+/891580
[2] https://docs.sqlalchemy.org/en/14/orm/loading_relationships.html
** Affects: neutron
Importance: High
Assignee: Miro Tomaska (mtomaska)
Status: In Progress
** Changed in: neutron
Importance: Undecided => High
** Changed in: neutron
Assignee: (unassigned) => Miro Tomaska (mtomaska)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2068761
Title:
Using "joined" relation on tags can cause slow query times in certain
situations
Status in neutron:
In Progress
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://review.opendev.org/c/openstack/neutron/+/891580
[2] https://docs.sqlalchemy.org/en/14/orm/loading_relationships.html
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2068761/+subscriptions
Follow ups