diff --git a/cmd/zoekt-sourcegraph-indexserver/main.go b/cmd/zoekt-sourcegraph-indexserver/main.go index d5c513bf..ebed6bd9 100644 --- a/cmd/zoekt-sourcegraph-indexserver/main.go +++ b/cmd/zoekt-sourcegraph-indexserver/main.go @@ -1235,7 +1235,6 @@ type rootConfig struct { listen string hostname string cpuFraction float64 - blockProfileRate int // config values related to shard merging disableShardMerging bool @@ -1258,7 +1257,6 @@ func (rc *rootConfig) registerRootFlags(fs *flag.FlagSet) { fs.StringVar(&rc.listen, "listen", ":6072", "listen on this address.") fs.StringVar(&rc.hostname, "hostname", zoekt.HostnameBestEffort(), "the name we advertise to Sourcegraph when asking for the list of repositories to index. Can also be set via the NODE_NAME environment variable.") fs.Float64Var(&rc.cpuFraction, "cpu_fraction", 1.0, "use this fraction of the cores for indexing.") - fs.IntVar(&rc.blockProfileRate, "block_profile_rate", getEnvWithDefaultInt("BLOCK_PROFILE_RATE", -1), "Sampling rate of Go's block profiler in nanoseconds. Values <=0 disable the blocking profiler Var(default). A value of 1 includes every blocking event. See https://pkg.go.dev/runtime#SetBlockProfileRate") fs.DurationVar(&rc.backoffDuration, "backoff_duration", getEnvWithDefaultDuration("BACKOFF_DURATION", 10*time.Minute), "for the given duration we backoff from enqueue operations for a repository that's failed its previous indexing attempt. Consecutive failures increase the duration of the delay linearly up to the maxBackoffDuration. A negative value disables indexing backoff.") fs.DurationVar(&rc.maxBackoffDuration, "max_backoff_duration", getEnvWithDefaultDuration("MAX_BACKOFF_DURATION", 120*time.Minute), "the maximum duration to backoff from enqueueing a repo for indexing. A negative value disables indexing backoff.") @@ -1369,10 +1367,6 @@ func newServer(conf rootConfig) (*Server, error) { // Tune GOMAXPROCS to match Linux container CPU quota. _, _ = maxprocs.Set() - // Set the sampling rate of Go's block profiler: https://github.com/DataDog/go-profiler-notes/blob/main/guide/README.md#block-profiler. - // The block profiler is disabled by default and should be enabled with care in production - runtime.SetBlockProfileRate(conf.blockProfileRate) - // Automatically prepend our own path at the front, to minimize // required configuration. if l, err := os.Readlink("/proc/self/exe"); err == nil {