{"record":{"id":"aa1fef75752e6e87","repo":"thanos-io/thanos","slug":"unsupported-item-type-s","errorCode":null,"errorMessage":"unsupported item type %s","messagePattern":"unsupported item type (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/store/cache/filter_cache.go","lineNumber":88,"sourceCode":"\t}\n}\n\n// FetchMultiSeries fetches multiple series - each identified by ID - from the cache\n// and returns a map containing cache hits, along with a list of missing IDs.\nfunc (c *FilteredIndexCache) FetchMultiSeries(ctx context.Context, blockID ulid.ULID, ids []storage.SeriesRef, tenant string) (hits map[storage.SeriesRef][]byte, misses []storage.SeriesRef) {\n\tif c.seriesEnabled {\n\t\treturn c.cache.FetchMultiSeries(ctx, blockID, ids, tenant)\n\t}\n\treturn nil, ids\n}\n\nfunc ValidateEnabledItems(enabledItems []string) error {\n\tfor _, item := range enabledItems {\n\t\tswitch item {\n\t\t// valid\n\t\tcase CacheTypePostings, CacheTypeExpandedPostings, CacheTypeSeries:\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unsupported item type %s\", item)\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":70,"sourceCodeEnd":93,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/store/cache/filter_cache.go#L70-L93","documentation":"ValidateEnabledItems checks each entry of the index-cache 'enabled_items' list against the valid cache item names (postings, expanded-postings, series for index cache). It returns this error for any item string that is not one of those values, so unknown or mistyped item names abort cache initialization.","triggerScenarios":"Calling NewIndexCache with config enabled_items containing e.g. 'meta', 'blocks', 'postings ', 'Postings' (case-sensitive), or item names valid only for a different cache (store cache's 'meta'/'bucket facts').","commonSituations":"Copying enabled_items from a store-gateway cache config into an index cache config; typos; wrong capitalization; trailing whitespace in YAML list items.","solutions":["Use only valid index-cache items: postings, expanded-postings, series.","Remove enabled_items entirely to cache all item types (the default).","Check for stray whitespace or case differences in list entries."],"exampleFix":"// before\nindex-cache:\n  enabled_items: [postings, meta]\n// after\nindex-cache:\n  enabled_items: [postings, expanded-postings, series]","handlingStrategy":"validation","validationCode":"var validItems = map[string]bool{\"postings\": true, \"expanded-postings\": true, \"series\": true}\nfor _, it := range enabledItems {\n\tif !validItems[strings.TrimSpace(it)] {\n\t\treturn fmt.Errorf(\"unsupported item type %q; valid: postings, expanded-postings, series\", it)\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := storecache.ValidateEnabledItems(items); err != nil {\n\tif strings.Contains(err.Error(), \"unsupported item type\") {\n\t\treturn fmt.Errorf(\"check enabled_items against index-cache item names: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Keep separate validated item lists for index cache vs store cache configs.","Trim whitespace from YAML list entries in config generation.","Omit enabled_items unless you specifically need to restrict cached items."],"tags":["config","validation","cache"],"backgroundTag":"invalid-enum-value","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"}