-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grpc: fix ListPath batch_size parameter
With the append being gated by the length check, for each batch sent, we were dropped the current path. Change to always append first, then check the length. The effect on small batch sizes was dramatic, and best shown with a size of 1: exactly half of the routes were missing. GoBGP with 500 routes: $ ./gobgp global rib -a evpn | wc -l 501 $ ./gobgp global rib -a evpn -b 1 | wc -l 251 $ ./gobgp global rib -a evpn -b 2 | wc -l 335 $ ./gobgp global rib -a evpn -b 500 | wc -l 501 Note: the above example uses 500 routes, but the issue is present even with two routes. This commit also adds a --batch-size to gobgp rib commands, to be able to use the tweak from the cli. It is very useful with a large number of routes to avoid GoBGP gobbling up gigabytes of memory.
- Loading branch information
Showing
4 changed files
with
5 additions
and
2 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
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
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
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