Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 9892995

Browse files
authored
searcher: downgrade hybrid logs to debug (#44353)
The "failed to find indexed commit" fires often for Sourcegraph.com since it only indexes a subset of repos. Additionally in production our default log level is warn. The log levels were inflated to help understand the feature, but given we can't see them in prod nor do we want to ship with these levels, they are turned down to debug. Test Plan: CI
1 parent 443a720 commit 9892995

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/searcher/internal/search/hybrid.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (s *Service) hybrid(ctx context.Context, p *protocol.Request, sender matchS
6262
return nil, false, err
6363
}
6464
if !ok {
65-
logger.Warn("failed to find indexed commit")
65+
logger.Debug("failed to find indexed commit")
6666
recordHybridFinalState("zoekt-list-missing")
6767
return nil, false, nil
6868
}
@@ -96,13 +96,13 @@ func (s *Service) hybrid(ctx context.Context, p *protocol.Request, sender matchS
9696
log.Int("totalLenUnindexedSearchPaths", totalLenUnindexedSearch))
9797

9898
if totalLenIndexedIgnore > s.MaxTotalPathsLength || totalLenUnindexedSearch > s.MaxTotalPathsLength {
99-
logger.Info("not doing hybrid search due to changed file list exceeding MAX_TOTAL_PATHS_LENGTH",
99+
logger.Debug("not doing hybrid search due to changed file list exceeding MAX_TOTAL_PATHS_LENGTH",
100100
log.Int("MAX_TOTAL_PATHS_LENGTH", s.MaxTotalPathsLength))
101101
recordHybridFinalState("diff-too-large")
102102
return nil, false, nil
103103
}
104104

105-
logger.Info("starting zoekt search")
105+
logger.Debug("starting zoekt search")
106106

107107
ok, err = zoektSearchIgnorePaths(ctx, client, p, sender, indexed, indexedIgnore)
108108
if err != nil {

cmd/searcher/internal/search/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (s *Service) search(ctx context.Context, p *protocol.Request, sender matchS
245245
return errors.Wrap(err, "hybrid search failed")
246246
}
247247
if !ok {
248-
s.Log.Warn("hybrid search is falling back to normal unindexed search",
248+
s.Log.Debug("hybrid search is falling back to normal unindexed search",
249249
log.String("repo", string(p.Repo)),
250250
log.String("commit", string(p.Commit)))
251251
} else {

0 commit comments

Comments
 (0)