Skip to content

Commit

Permalink
set default values for community filter cutoff and query limit
Browse files Browse the repository at this point in the history
  • Loading branch information
annikahannig committed Feb 8, 2024
1 parent a8f6abe commit 369d3e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion etc/alice-lg/alice.example.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ neighbors_store_refresh_interval = 5
# Maximum number of routes returned from the store in a prefix
# search, to avoid timeouts with too big result sets.
# This is important when querying BGP communities, as some might
# match a large number of routes.
# match a large number of routes. (Default: 200000)
routes_store_query_limit = 200000

# Add a delay to the stream parser in order to reduce
Expand Down
5 changes: 5 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ const (
// routes after which the community filter will not be
// available.
DefaultPrefixLookupCommunityFilterCutoff = 100000

// DefaultRoutesStoreQueryLimit is the default limit for
// prefixes returned from the store.
DefaultRoutesStoreQueryLimit = 200000
)

// A ServerConfig holds the runtime configuration
Expand Down Expand Up @@ -940,6 +944,7 @@ func LoadConfig(file string) (*Config, error) {
StoreBackend: "memory",
RoutesStoreRefreshParallelism: 1,
NeighborsStoreRefreshParallelism: 1,
RoutesStoreQueryLimit: DefaultRoutesStoreQueryLimit,
}
if err := parsedConfig.Section("server").MapTo(&server); err != nil {
return nil, err
Expand Down

0 comments on commit 369d3e1

Please sign in to comment.