{"record":{"id":"6413611977cc8b2f","repo":"thanos-io/thanos","slug":"read-series-641361","errorCode":null,"errorMessage":"read series","messagePattern":"read series","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/store/bucket.go","lineNumber":1318,"sourceCode":"\tb.indexr.reset(len(postingsBatch))\n\tif !b.skipChunks {\n\t\tb.chunkr.reset()\n\t}\n\n\tif err := b.indexr.PreloadSeries(b.ctx, postingsBatch, b.bytesLimiter, b.tenant); err != nil {\n\t\treturn errors.Wrap(err, \"preload series\")\n\t}\n\n\tseriesMatched := 0\n\tb.entries = b.entries[:0]\nOUTER:\n\tfor i := range postingsBatch {\n\t\tif err := b.ctx.Err(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\thasMatchedChunks, err := b.indexr.LoadSeriesForTime(postingsBatch[i], &b.symbolizedLset, &b.chkMetas, b.skipChunks, b.mint, b.maxt)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"read series\")\n\t\t}\n\t\t// Skip getting series symbols if we know there is no matched chunks\n\t\t// and lazy expanded posting not enabled.\n\t\tif !lazyExpandedPosting && !hasMatchedChunks {\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := b.indexr.LookupLabelsSymbols(b.ctx, b.symbolizedLset, b.b); err != nil {\n\t\t\treturn errors.Wrap(err, \"Lookup labels symbols\")\n\t\t}\n\t\tb.lset = b.b.Labels()\n\n\t\tfor _, matcher := range b.lazyPostings.matchers {\n\t\t\tval := b.lset.Get(matcher.Name)\n\t\t\tif !matcher.Matches(val) {\n\t\t\t\t// Series not matched means series we overfetched due to lazy posting expansion.\n\t\t\t\tseriesBytes := b.indexr.loadedSeries[postingsBatch[i]]\n\t\t\t\tb.lazyExpandedPostingSeriesOverfetchedSizeBytes.Add(float64(len(seriesBytes)))","sourceCodeStart":1300,"sourceCodeEnd":1336,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/store/bucket.go#L1300-L1336","documentation":"Wraps IndexReader.LoadSeriesForTime failure in blockSeriesClient.series. This step decodes each preloaded series' symbols and chunk metadata, filtering by the query time range (mint/maxt). Failure indicates corrupt or unreadable series data in the block index.","triggerScenarios":"For each posting batch entry, indexr.LoadSeriesForTime(posting, &symbolizedLset, &chkMetas, skipChunks, mint, maxt) errors while decoding a series entry or its chunk metadata from the index.","commonSituations":"Bit-corrupted index files (bad disk/object store), blocks written by mismatched Prometheus index versions, memory pressure corrupting reader caches.","solutions":["Identify the failing block via the wrapped error and run 'thanos tools bucket verify'.","Delete or restore the corrupted block so the compactor re-uploads a healthy copy.","Check for storage-layer bit rot (object-store checksum features, disk health on store gateway cache dirs).","Confirm all components run Prometheus/Thanos versions with compatible index formats."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := query(ctx); err != nil && strings.Contains(err.Error(), \"read series\") {\n\tlogger.Error(\"series decode failed; possible corrupt block\", \"err\", err)\n\t// fall back to partial results or failover to another store instance\n\treturn failoverQuery(ctx, q)\n}","preventionTips":["Enable object-store checksums to detect bit rot at rest.","Run 'thanos tools bucket verify' regularly and quarantine corrupt blocks.","Keep compactor, store gateway, and Prometheus index versions aligned.","Monitor store gateway memory to prevent reader-cache corruption under pressure."],"tags":["index","series-loading","corruption"],"backgroundTag":"database-query-failed","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"}