diff --git a/go/lib/infra/modules/segfetcher/fetcher.go b/go/lib/infra/modules/segfetcher/fetcher.go index fa0806663a..57aed9b244 100644 --- a/go/lib/infra/modules/segfetcher/fetcher.go +++ b/go/lib/infra/modules/segfetcher/fetcher.go @@ -113,8 +113,7 @@ func (f *Fetcher) FetchSegs(ctx context.Context, req Request) (Segments, error) return Segments{}, err } var segs Segments - i := 0 - for { + for i := 0; i < 3; i++ { log.FromCtx(ctx).Trace("Request to process", "req", reqSet, "segs", segs, "iteration", i+1) segs, reqSet, err = f.Resolver.Resolve(ctx, segs, reqSet) @@ -126,7 +125,8 @@ func (f *Fetcher) FetchSegs(ctx context.Context, req Request) (Segments, error) if reqSet.IsEmpty() { break } - if i > 3 { + // in 3 iteration (i==2) everything should be resolved. + if i >= 2 { log.FromCtx(ctx).Error("No convergence in lookup", "iteration", i+1) return segs, common.NewBasicError("Segment lookup doesn't converge", nil, "iterations", i+1) @@ -163,17 +163,17 @@ func (f *Fetcher) waitOnProcessed(ctx context.Context, replies <-chan ReplyOrErr if err := r.Err(); err != nil { return err } - for _, rev := range r.Stats().VerifiedRevs { - revInfo, err := rev.RevInfo() - if err != nil { - logger.Warn("Failed to extract rev info from verified rev", - "err", err, "rev", rev) - continue - } - // TODO(lukedirtwalker): collect all revInfos and delete only - // once. - f.NextQueryCleaner.ResetQueryCache(ctx, revInfo) - } + // for _, rev := range r.Stats().VerifiedRevs { + // revInfo, err := rev.RevInfo() + // if err != nil { + // logger.Warn("Failed to extract rev info from verified rev", + // "err", err, "rev", rev) + // continue + // } + // // TODO(lukedirtwalker): collect all revInfos and delete only + // // once. + // f.NextQueryCleaner.ResetQueryCache(ctx, revInfo) + // } nextQuery := f.nextQuery(r.Stats().VerifiedSegs) _, err := f.PathDB.InsertNextQuery(ctx, reply.Req.Src, reply.Req.Dst, nil, nextQuery) if err != nil { diff --git a/go/path_srv/internal/handlers/segrevoc.go b/go/path_srv/internal/handlers/segrevoc.go index 0a211c41a9..54442a9c12 100644 --- a/go/path_srv/internal/handlers/segrevoc.go +++ b/go/path_srv/internal/handlers/segrevoc.go @@ -76,9 +76,9 @@ func (h *revocHandler) Handle() *infra.HandlerResult { sendAck(proto.Ack_ErrCode_reject, messenger.AckRejectFailedToVerify) return infra.MetricsErrInvalid } - if err := h.NextQueryCleaner.ResetQueryCache(ctx, revInfo); err != nil { - logger.Warn("Couldn't reset pathdb cache for revocation", "err", err) - } + // if err := h.NextQueryCleaner.ResetQueryCache(ctx, revInfo); err != nil { + // logger.Warn("Couldn't reset pathdb cache for revocation", "err", err) + // } _, err = h.revCache.Insert(ctx, revocation) if err != nil { diff --git a/go/sciond/internal/servers/handlers.go b/go/sciond/internal/servers/handlers.go index ba5e9756f3..44b7439090 100644 --- a/go/sciond/internal/servers/handlers.go +++ b/go/sciond/internal/servers/handlers.go @@ -263,13 +263,13 @@ func (h *RevNotificationHandler) Handle(ctx context.Context, conn net.PacketConn switch { case isValid(err): revReply.Result = sciond.RevValid - revInfo, err := revNotification.SRevInfo.RevInfo() - if err != nil { - logger.Error("Failed to extract error from rev info", "err", err) - } - if err := h.NextQueryCleaner.ResetQueryCache(ctx, revInfo); err != nil { - logger.Error("Failed to delete query cache", "err", err) - } + // revInfo, err := revNotification.SRevInfo.RevInfo() + // if err != nil { + // logger.Error("Failed to extract error from rev info", "err", err) + // } + // if err := h.NextQueryCleaner.ResetQueryCache(ctx, revInfo); err != nil { + // logger.Error("Failed to delete query cache", "err", err) + // } case isStale(err): revReply.Result = sciond.RevStale case isInvalid(err):