refact(tsdb): reuse variable instead of loading from head

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
György Krajcsovits 2026-02-18 19:14:37 +01:00
parent 1ef2063e78
commit 9bebcdf593
No known key found for this signature in database
GPG key ID: 47A8F9CE80FD7C7F

View file

@ -1061,7 +1061,7 @@ func (a *headAppenderBase) log() error {
defer func() { a.head.putBytesBuffer(buf) }()
var rec []byte
enc := record.Encoder{EnableSTStorage: a.head.opts.EnableSTStorage.Load()}
enc := record.Encoder{EnableSTStorage: a.storeST}
if len(a.seriesRefs) > 0 {
rec = enc.Series(a.seriesRefs, buf)
@ -1749,7 +1749,7 @@ func (a *headAppenderBase) Commit() (err error) {
samplesPerChunk: h.opts.SamplesPerChunk,
},
oooEnc: record.Encoder{
EnableSTStorage: h.opts.EnableSTStorage.Load(),
EnableSTStorage: a.storeST,
},
}