Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhengl committed Nov 21, 2024
1 parent 12a12cd commit bd5c2ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shards/shards.go
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,9 @@ func (s *shardedSearcher) getLoaded() loaded {

func mkRankedShard(s zoekt.Searcher) *rankedShard {
q := query.Const{Value: true}
// We need to use UnsafeCtx here, otherwise we cannot return a proper
// rankedShard. On the user request path we use selectRepoSet which relies on
// rankedShard.repos being set.
result, err := s.List(systemtenant.UnsafeCtx, &q, nil)
if err != nil {
return &rankedShard{Searcher: s}
Expand Down

0 comments on commit bd5c2ce

Please sign in to comment.