···175175 // deltaShardNumberFallbackThreshold is an upper limit on the number of preexisting shards that can exist
176176 // before attempting a delta build.
177177 deltaShardNumberFallbackThreshold uint64
178178+179179+ // repositoriesSkipSymbolsCalculationAllowList is an allowlist for repositories that
180180+ // we skip calculating symbols metadata for during builds
181181+ repositoriesSkipSymbolsCalculationAllowList map[string]struct{}
178182}
179183180184var debug = log.New(ioutil.Discard, "", log.LstdFlags)
···477481478482 repositoryName := args.Name
479483 if _, ok := s.deltaBuildRepositoriesAllowList[repositoryName]; ok {
480480- repositoryID := args.BuildOptions().RepositoryDescription.ID
481481- debug.Printf("delta build: Server.Index: marking %q (ID %d) for delta build", repositoryName, repositoryID)
482482-484484+ tr.LazyPrintf("marking this repository for delta build")
483485 args.UseDelta = true
484486 }
485487486488 args.DeltaShardNumberFallbackThreshold = s.deltaShardNumberFallbackThreshold
489489+490490+ if _, ok := s.repositoriesSkipSymbolsCalculationAllowList[repositoryName]; ok {
491491+ tr.LazyPrintf("skipping symbols calculation")
492492+ args.Symbols = false
493493+ }
487494488495 reason := "forced"
489496···924931 debug.Printf("disabling delta build fallback behavior - delta builds will be performed regardless of the number of preexisting shards")
925932 }
926933934934+ reposShouldSkipSymbolsCalculation := getEnvWithDefaultEmptySet("SKIP_SYMBOLS_REPOS_ALLOWLIST")
935935+ if len(reposShouldSkipSymbolsCalculation) > 0 {
936936+ debug.Printf("skipping generating symbols metadata for: %s", joinStringSet(reposShouldSkipSymbolsCalculation, ", "))
937937+ }
938938+927939 var sg Sourcegraph
928940 if rootURL.IsAbs() {
929941 var batchSize int
···959971 shardMerging: zoekt.ShardMergingEnabled(),
960972 deltaBuildRepositoriesAllowList: deltaBuildRepositoriesAllowList,
961973 deltaShardNumberFallbackThreshold: deltaShardNumberFallbackThreshold,
974974+ repositoriesSkipSymbolsCalculationAllowList: reposShouldSkipSymbolsCalculation,
962975 }, err
963976}
964977