{"record":{"id":"47ef1a394a204f5b","repo":"grafana/loki","slug":"creating-task-results-cache-v","errorCode":null,"errorMessage":"creating task results cache: %v","messagePattern":"creating task results cache: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/engine/basic_engine.go","lineNumber":53,"sourceCode":"// HTTP 501). The canonical definition lives in the internal errors package so\n// it can be returned from inner packages such as the physical planner; this\n// re-export keeps the existing public surface stable.\nvar ErrNotSupported = internalerrors.ErrNotSupported\n\n// NewBasic creates a new instance of the basic query engine that implements the\n// [logql.Engine] interface. The basic engine executes plans sequentially with\n// no local or distributed parallelism.\nfunc NewBasic(cfg ExecutorConfig, ms metastore.Metastore, bucket objstore.Bucket, limits logql.Limits, reg prometheus.Registerer, logger log.Logger) *Basic {\n\tif cfg.BatchSize <= 0 {\n\t\tpanic(fmt.Sprintf(\"invalid batch size for query engine. must be greater than 0, got %d\", cfg.BatchSize))\n\t}\n\tif cfg.RangeConfig.IsZero() {\n\t\tcfg.RangeConfig = rangeio.DefaultConfig\n\t}\n\n\ttaskCaches, err := executor.NewTaskCacheRegistry(cfg.TaskResultsCache.Config, reg, logger)\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"creating task results cache: %v\", err))\n\t}\n\n\treturn &Basic{\n\t\tlogger:     logger,\n\t\tmetrics:    newMetrics(reg),\n\t\tlimits:     limits,\n\t\tmetastore:  ms,\n\t\tbucket:     bucket,\n\t\tcfg:        cfg,\n\t\ttaskCaches: taskCaches,\n\t}\n}\n\n// Basic is a basic LogQL evaluation engine. Evaluation is performed\n// sequentially, with no local or distributed parallelism.\ntype Basic struct {\n\tlogger     log.Logger\n\tmetrics    *metrics","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/grafana/loki/blob/24cfedd4f67b53367b63e273d64dbfc5ad307535/pkg/engine/basic_engine.go#L35-L71","documentation":"Error \"creating task results cache: %v\" thrown in grafana/loki.","triggerScenarios":"Thrown at pkg/engine/basic_engine.go:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24cfedd4f67b53367b63e273d64dbfc5ad307535","analyzedAt":"2026-08-15T20:47:01.143Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}