commit ab6e1fee0c04d3adfb6f3813f1ce116d89193aad
Author: Daniel Alvarez <email address hidden>
Date: Thu May 10 16:21:22 2018 +0200
Improve DbListCommand operation from O(n^2) to O(n)
Right now the DbListCommand retrieves the uuid's of all the elements
passed in as argument. This is an O(n^2) operation so when the number
of elements in a grows it's likely that we get Timeout Exceptions.
Instead of doing this, whenever possible, we'll retrieve all the
elements (from the in-memory replica) and only fetch those who were
passed as arguments avoiding the O(n^2) operation.
NOTE: this cherry pick conflicted because in stable/pike, the commands.py
file was in different location.
Closes-Bug: #1769897
(cherry picked from fd64d41ea6f208a5752fbcd45952a04633ee1392)
Signed-off-by: Daniel Alvarez <email address hidden>
Reviewed: https:/ /review. openstack. org/567603 /git.openstack. org/cgit/ openstack/ ovsdbapp/ commit/ ?id=ab6e1fee0c0 4d3adfb6f3813f1 ce116d89193aad
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit ab6e1fee0c04d3a dfb6f3813f1ce11 6d89193aad
Author: Daniel Alvarez <email address hidden>
Date: Thu May 10 16:21:22 2018 +0200
Improve DbListCommand operation from O(n^2) to O(n)
Right now the DbListCommand retrieves the uuid's of all the elements
passed in as argument. This is an O(n^2) operation so when the number
of elements in a grows it's likely that we get Timeout Exceptions.
Instead of doing this, whenever possible, we'll retrieve all the
elements (from the in-memory replica) and only fetch those who were
passed as arguments avoiding the O(n^2) operation.
NOTE: this cherry pick conflicted because in stable/pike, the commands.py
file was in different location.
Closes-Bug: #1769897 5752fbcd45952a0 4633ee1392)
(cherry picked from fd64d41ea6f208a
Signed-off-by: Daniel Alvarez <email address hidden>
Change-Id: Iacded885bb8523 15263ee926b9af5 a1c3dc0dbba