0
0
Fork 0

fix MB-28719 and MB-28781 invalid/missing field in scorch

Use of sync.Pool to reuse the interm structure relied on resetting
the fieldsInv slice.  However, actual segments continued to use
this same fieldsInv slice after returning it to the pool. Simple
fix is to nil out fieldsInv slice in reset method and let the
newly built segment keep the one from the interim struct.
This commit is contained in:
Marty Schoch 2018-03-20 17:41:56 -04:00
parent e88cb783e2
commit 35ea1d4423
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ func (s *interim) reset() (err error) {
s.chunkFactor = 0
s.w = nil
s.FieldsMap = nil
s.FieldsInv = s.FieldsInv[:0]
s.FieldsInv = nil
for i := range s.Dicts {
s.Dicts[i] = nil
}