Commit Graph

9 Commits

Author SHA1 Message Date
Vincent Bernat
f7cc5e3dbc orchestrator/clickhouse: add a benchmark for networks.csv
```
goos: linux
goarch: amd64
pkg: akvorado/orchestrator/clickhouse
cpu: AMD Ryzen 5 5600X 6-Core Processor
BenchmarkNetworks-12                 482                 2.447 ms/op
```
2025-08-17 11:05:58 +02:00
Vincent Bernat
6118bb7aac common/helpers: convert SubnetMap to github.com/gaissmai/bart
I did not benchmark it myself, but it was benchmarked here:
 https://github.com/osrg/gobgp/issues/1414#issuecomment-3067255941

Of course, no guarantee that this benchmark matches our use cases.
Moreover, SubnetMap have been optimized to avoid parsing keys all
the time.

Also, the interface is a bit nicer and it uses netip.Prefix directly.

The next step is to convert outlet/routing/provider/bmp.
2025-08-16 09:38:44 +02:00
Vincent Bernat
0a10764cc9 orchestrator: switch to github.com/oschwald/maxminddb-golang/v2
Also, remove the AS name, this is not used at all.
2025-08-02 15:56:54 +02:00
Vincent Bernat
10dfefebb4 orchestrator/clickhouse: avoid leaking contexts
Scope the cancel() method to avoid leaking contexts in an infinite loop.
2025-07-29 07:42:49 +02:00
netixx
098973a20e Fix typo in merging of attributes for Site 2024-05-16 10:11:39 +02:00
Vincent Bernat
600f22f98f orchestrator/clickhouse: remove previous networks.csv temporary files
Fix #1221
2024-05-15 13:56:02 +02:00
Vincent Bernat
93452cfbfa orchestrator: do not use AS names for tenants
This was introduced with #1059, but I think this was a mistake. Notably,
it enables erasing the tenants provided by the user.

It also opens the question whetever to have network sources or static
sources override more specific entries or not. This is currently not the
case, but then, if a more specific GeoIP entry appears, it may require
to add a more specific entry if overriding is needed.

This could also be configurable.
2024-04-27 15:07:38 +02:00
Vincent Bernat
f905f9dd25 orchestrator/clickhouse: fix panic in networks CSV refresher
Upon second refresh, we close again the "ready" channel, leading to a
panic.
2024-04-13 15:55:20 +02:00
Vincent Bernat
41412d430d orchestrator/clickhouse: buffer networks.csv to disk
And build it on changes, not on the fly.
2024-03-17 00:00:32 +01:00