{"record":{"id":"ba124ba7bf7e84e7","repo":"thanos-io/thanos","slug":"not-implemented","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compact/downsample/aggr.go","lineNumber":49,"sourceCode":"\t\t\tb = append(b, buf[:n]...)\n\t\t\tcontinue\n\t\t}\n\t\tl := len(c.Bytes())\n\t\tn := binary.PutUvarint(buf[:], uint64(l))\n\t\tb = append(b, buf[:n]...)\n\t\tb = append(b, byte(c.Encoding()))\n\t\tb = append(b, c.Bytes()...)\n\t}\n\tchk := AggrChunk(b)\n\treturn &chk\n}\n\nfunc (c AggrChunk) Bytes() []byte {\n\treturn []byte(c)\n}\n\nfunc (c AggrChunk) Appender() (chunkenc.Appender, error) {\n\treturn nil, errors.New(\"not implemented\")\n}\n\nfunc (c AggrChunk) Iterator(_ chunkenc.Iterator) chunkenc.Iterator {\n\treturn chunkenc.NewNopIterator()\n}\n\nfunc (c AggrChunk) NumSamples() int {\n\tx, err := c.Get(AggrCount)\n\tif err != nil {\n\t\treturn 0\n\t}\n\treturn x.NumSamples()\n}\n\n// ErrAggrNotExist is returned if a requested aggregation is not present in an AggrChunk.\nvar ErrAggrNotExist = errors.New(\"aggregate does not exist\")\n\nfunc (c AggrChunk) Encoding() chunkenc.Encoding {","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/compact/downsample/aggr.go#L31-L67","documentation":"AggrChunk.Appender() unconditionally returns this sentinel error because aggregate (downsampled) chunks are read-only: they are built once during downsampling and support only iteration/Get, not sample appends. It fires whenever any code path (e.g. a compaction or head writer) tries to obtain a chunkenc.Appender for an AggrChunk.","triggerScenarios":"Thrown at pkg/compact/downsample/aggr.go:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not call Appender() on AggrChunk; it is intentionally unsupported.","Build a new AggrChunk from source chunks instead of appending to an existing one.","Route write paths to raw chunks and keep AggrChunk read-only."],"exampleFix":null,"handlingStrategy":"try-catch","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"}