thanos-io/thanos · error
not implemented
Error message
not implemented
What it means
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.
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.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at pkg/compact/downsample/aggr.go:49 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/ba124ba7bf7e84e7.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/compact/downsample/aggr.go:49
b = append(b, buf[:n]...)
continue
}
l := len(c.Bytes())
n := binary.PutUvarint(buf[:], uint64(l))
b = append(b, buf[:n]...)
b = append(b, byte(c.Encoding()))
b = append(b, c.Bytes()...)
}
chk := AggrChunk(b)
return &chk
}
func (c AggrChunk) Bytes() []byte {
return []byte(c)
}
func (c AggrChunk) Appender() (chunkenc.Appender, error) {
return nil, errors.New("not implemented")
}
func (c AggrChunk) Iterator(_ chunkenc.Iterator) chunkenc.Iterator {
return chunkenc.NewNopIterator()
}
func (c AggrChunk) NumSamples() int {
x, err := c.Get(AggrCount)
if err != nil {
return 0
}
return x.NumSamples()
}
// ErrAggrNotExist is returned if a requested aggregation is not present in an AggrChunk.
var ErrAggrNotExist = errors.New("aggregate does not exist")
func (c AggrChunk) Encoding() chunkenc.Encoding {View on GitHub (pinned to 35b8b99117)