{"record":{"id":"cd7ce61b10c16d2f","repo":"thanos-io/thanos","slug":"create-index-cache","errorCode":null,"errorMessage":"create index cache","messagePattern":"create index cache","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/store.go","lineNumber":373,"sourceCode":"\n\tindexCacheContentYaml, err := conf.indexCacheConfigs.Content()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"get content of index cache configuration\")\n\t}\n\n\t// Create the index cache loading its config from config file, while keeping\n\t// backward compatibility with the pre-config file era.\n\tvar indexCache storecache.IndexCache\n\tif len(indexCacheContentYaml) > 0 {\n\t\tindexCache, err = storecache.NewIndexCache(logger, indexCacheContentYaml, reg)\n\t} else {\n\t\tindexCache, err = storecache.NewInMemoryIndexCacheWithConfig(logger, nil, reg, storecache.InMemoryIndexCacheConfig{\n\t\t\tMaxSize:     model.Bytes(conf.indexCacheSizeBytes),\n\t\t\tMaxItemSize: storecache.DefaultInMemoryIndexCacheConfig.MaxItemSize,\n\t\t})\n\t}\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"create index cache\")\n\t}\n\n\tvar matchersCache = storecache.NoopMatchersCache\n\tif conf.matcherCacheSize > 0 {\n\t\tmatchersCache, err = storecache.NewMatchersCache(storecache.WithSize(conf.matcherCacheSize), storecache.WithPromRegistry(reg))\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to create matchers cache\")\n\t\t}\n\t}\n\n\tvar blockLister block.Lister\n\tswitch syncStrategy(conf.blockListStrategy) {\n\tcase concurrentDiscovery:\n\t\tblockLister = block.NewConcurrentLister(logger, insBkt)\n\tcase recursiveDiscovery:\n\t\tblockLister = block.NewRecursiveLister(logger, insBkt)\n\tdefault:\n\t\treturn errors.Errorf(\"unknown sync strategy %s\", conf.blockListStrategy)","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/store.go#L355-L391","documentation":"storecache.NewIndexCache (or the in-memory fallback) failed to build the index cache from the provided config, e.g. invalid in-memory cache sizes or unreachable memcached servers. Store startup aborts.","triggerScenarios":"Thrown at cmd/thanos/store.go:373 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check index cache config sizes (max-size, max-item-size)","Verify memcached endpoints if using a distributed cache","Fix YAML/schema errors in the index cache config"],"exampleFix":null,"handlingStrategy":"validation","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"}