{"record":{"id":"77a4422595341cac","repo":"thanos-io/thanos","slug":"opening-storage","errorCode":null,"errorMessage":"opening storage","messagePattern":"opening storage","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/receive.go","lineNumber":772,"sourceCode":"\t\t\t\t// If new receivers were added to the hashring, existing receivers will not need to\n\t\t\t\t// ingest additional series.\n\t\t\t\t// If receivers are removed from the hashring, existing receivers will only need\n\t\t\t\t// to ingest a subset of the series that were assigned to the removed receivers.\n\t\t\t\t// As a result, changing the hashring produces no churn, hence no need to force\n\t\t\t\t// head compaction and upload.\n\t\t\t\tflushHead := !initialized || hashringAlgorithm != receive.AlgorithmKetama\n\t\t\t\tif flushHead {\n\t\t\t\t\tmsg := \"hashring has changed; server is not ready to receive requests\"\n\t\t\t\t\tstatusProber.NotReady(errors.New(msg))\n\t\t\t\t\tlevel.Info(logger).Log(\"msg\", msg)\n\n\t\t\t\t\tlevel.Info(logger).Log(\"msg\", \"updating storage\")\n\t\t\t\t\tdbUpdatesStarted.Inc()\n\t\t\t\t\tif err := dbs.Flush(); err != nil {\n\t\t\t\t\t\treturn errors.Wrap(err, \"flushing storage\")\n\t\t\t\t\t}\n\t\t\t\t\tif err := dbs.Open(); err != nil {\n\t\t\t\t\t\treturn errors.Wrap(err, \"opening storage\")\n\t\t\t\t\t}\n\t\t\t\t\tif upload {\n\t\t\t\t\t\tuploadC <- struct{}{}\n\t\t\t\t\t\t<-uploadDone\n\t\t\t\t\t}\n\t\t\t\t\tdbUpdatesCompleted.Inc()\n\t\t\t\t\tstatusProber.Ready()\n\t\t\t\t\tlevel.Info(logger).Log(\"msg\", \"storage started, and server is ready to receive requests\")\n\t\t\t\t\tdbUpdatesCompleted.Inc()\n\t\t\t\t}\n\t\t\t\tinitialized = true\n\t\t\t}\n\t\t}\n\t}, func(err error) {\n\t\tclose(cancel)\n\t})\n\n\tif upload {","sourceCodeStart":754,"sourceCodeEnd":790,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/receive.go#L754-L790","documentation":"Reopening the MultiTSDB storage after a hashring-change flush failed. The tenant DBs cannot be opened (locks, corruption, permissions), so the server stays not-ready and the run group receives the error.","triggerScenarios":"Thrown at cmd/thanos/receive.go:772 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect underlying TSDB open error in logs","Check for corrupt blocks in tenant dirs","Verify no concurrent process holds TSDB locks"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}