From 5c721226cfab83b0cbd366aef6919ccc0df20364 Mon Sep 17 00:00:00 2001 From: abhinavdangeti Date: Tue, 6 Mar 2018 15:53:14 -0800 Subject: [PATCH] Fixing the scorch search request memory estimate Do not re-account for certain referenced data in the zap structures. New estimates: ESTIMATE BENCHMEM TermQuery 11396 12437 MatchQuery 12244 12951 DisjunctionQuery (Term queries) 20644 20709 --- index/scorch/segment/zap/posting.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/index/scorch/segment/zap/posting.go b/index/scorch/segment/zap/posting.go index ef21df8d..8106ebcc 100644 --- a/index/scorch/segment/zap/posting.go +++ b/index/scorch/segment/zap/posting.go @@ -57,18 +57,6 @@ type PostingsList struct { func (p *PostingsList) Size() int { sizeInBytes := reflectStaticSizePostingsList + size.SizeOfPtr - if p.sb != nil { - sizeInBytes += (p.sb.Size() - len(p.sb.mem)) // do not include the mmap'ed part - } - - if p.locBitmap != nil { - sizeInBytes += int(p.locBitmap.GetSizeInBytes()) - } - - if p.postings != nil { - sizeInBytes += int(p.postings.GetSizeInBytes()) - } - if p.except != nil { sizeInBytes += int(p.except.GetSizeInBytes()) }