Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovn-northd: Don't check datapath groups in full if not needed.
The '/* Push changes to the Logical_Flow table to database. */' loop reads all the datapaths from the datapath group and checks them even if it's not required. To check that flow has at least one valid datapath, we need to find one valid datapath. To find Sb logical flow we need a datapath type and for this we only need one datapath again. Technically, the only place where we need to check all datapaths is when we're checking certain Sb datapath group for the first time. In all other cases we can validate/discard the flow by other characteristics that we already know. The change saves a fair amount of time in this loop. Up to a few seconds in case of a big database. More comments added to make the code easier to read. Acked-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: Numan Siddique <numans@ovn.org>
- Loading branch information
1 parent
20fbe24
commit 1313d64
Showing
1 changed file
with
43 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters