{"record":{"id":"f9c0a92d3aca1828","repo":"thanos-io/thanos","slug":"incomplete-view","errorCode":null,"errorMessage":"incomplete view","messagePattern":"incomplete view","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/block/fetcher.go","lineNumber":694,"sourceCode":"\t// Copy as same response might be reused by different goroutines.\n\tmetas := make(map[ulid.ULID]*metadata.Meta, len(resp.metas))\n\tmaps.Copy(metas, resp.metas)\n\n\tmetrics.Synced.WithLabelValues(FailedMeta).Set(float64(len(resp.metaErrs)))\n\tmetrics.Synced.WithLabelValues(NoMeta).Set(resp.noMetas)\n\tmetrics.Synced.WithLabelValues(CorruptedMeta).Set(resp.corruptedMetas)\n\n\tfor _, filter := range filters {\n\t\t// NOTE: filter can update synced metric accordingly to the reason of the exclude.\n\t\tif err := filter.Filter(ctx, metas, metrics.Synced, metrics.Modified); err != nil {\n\t\t\treturn nil, nil, errors.Wrap(err, \"filter metas\")\n\t\t}\n\t}\n\n\tmetrics.Synced.WithLabelValues(LoadedMeta).Set(float64(len(metas)))\n\n\tif len(resp.metaErrs) > 0 {\n\t\treturn metas, resp.partial, errors.Wrap(resp.metaErrs.Err(), \"incomplete view\")\n\t}\n\n\tlevel.Info(f.logger).Log(\"msg\", \"successfully synchronized block metadata\", \"duration\", time.Since(start).String(), \"duration_ms\", time.Since(start).Milliseconds(), \"cached\", f.countCached(), \"returned\", len(metas), \"partial\", len(resp.partial))\n\treturn metas, resp.partial, nil\n}\n\nfunc (f *BaseFetcher) countCached() int {\n\tf.mtx.Lock()\n\tdefer f.mtx.Unlock()\n\tvar i int\n\tf.cached.Range(func(_, _ any) bool {\n\t\ti++\n\t\treturn true\n\t})\n\treturn i\n}\n\ntype MetaFetcher struct {","sourceCodeStart":676,"sourceCodeEnd":712,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/block/fetcher.go#L676-L712","documentation":"Returned by the block metadata sync fetcher when some block metadata could not be fetched from the object store, so the returned metadata list is an 'incomplete view' of the blocks in the bucket. It wraps the aggregated per-block errors (resp.metaErrs), while any successfully fetched metas are still returned alongside the error.","triggerScenarios":"Calling FetchMetas (concurrent metadata sync) when one or more per-block metadata reads fail (Get of meta.json fails, corrupt/unparsable meta JSON, bucket errors, context cancellation), and syncMetadata's concurrency is > 1 so partial results are tolerated.","commonSituations":"Bucket throttling or transient network errors during a query/store startup; blocks deleted mid-sync by compactor (meta.json 404s); corrupted or partially written meta.json; very large buckets where slow object stores time out.","solutions":["Inspect the wrapped metaErrs (errors.Unwrap / errors.Is on the inner errors) to find which block IDs failed and why","Retry the sync; transient bucket/network errors usually resolve on a subsequent attempt","Check bucket permissions and availability; ensure meta.json files exist and are fully written","Reduce metadata concurrency if the bucket is rate-limited, or increase timeouts","If blocks were deleted mid-sync, ignore benign NotFound errors for blocks removed by the compactor"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"metas, partial, err := fetcher.FetchMetas(ctx)\nif err != nil {\n    var agg interface{ Unwrap() []error }\n    if errors.As(err, &agg) {\n        for _, e := range agg.Unwrap() { log.Printf(\"block meta failed: %v\", e) }\n    }\n    // decide: fail hard vs continue with partial + partial list\n}","preventionTips":["Retry metadata syncs with backoff on transient bucket errors","Monitor bucket error rates and rate limits","Tolerate NotFound for blocks deleted by the compactor mid-sync","Size metadata concurrency to your bucket's limits"],"tags":["object-storage","blocks","partial-failure"],"backgroundTag":"upstream-api-error","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"}