Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routing: refactor update id logging #3116

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions routing/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,14 +542,16 @@ func receiveRouteMatcher(o Options, out chan<- *routeTable, quit <-chan struct{}
rt *routeTable
outRelay chan<- *routeTable
updatesRelay <-chan []*eskip.Route
updateId int
)
updatesRelay = updates
for id := 1; ; id++ {
for {
select {
case defs := <-updatesRelay:
updateId++
start := time.Now()

o.Log.Infof("route settings received, id: %d", id)
o.Log.Infof("route settings received, id: %d", updateId)

for i := range o.PreProcessors {
defs = o.PreProcessors[i].Do(defs)
Expand Down Expand Up @@ -585,7 +587,7 @@ func receiveRouteMatcher(o Options, out chan<- *routeTable, quit <-chan struct{}
})

rt = &routeTable{
id: id,
id: updateId,
m: m,
routes: routes,
validRoutes: validRoutes,
Expand Down
Loading