scorch zap merge optimize newDocNums lookup to outside of loop
And, also a "go fmt".
This commit is contained in:
parent
98d5d7bd81
commit
99ed127176
|
@ -68,7 +68,6 @@ OUTER:
|
||||||
persistWatchers = s.pausePersisterForMergerCatchUp(lastPersistedEpoch,
|
persistWatchers = s.pausePersisterForMergerCatchUp(lastPersistedEpoch,
|
||||||
&lastMergedEpoch, persistWatchers)
|
&lastMergedEpoch, persistWatchers)
|
||||||
|
|
||||||
|
|
||||||
var ourSnapshot *IndexSnapshot
|
var ourSnapshot *IndexSnapshot
|
||||||
var ourPersisted []chan error
|
var ourPersisted []chan error
|
||||||
|
|
||||||
|
|
|
@ -316,10 +316,12 @@ func persistMergedRest(segments []*SegmentBase, dropsIn []*roaring.Bitmap,
|
||||||
return nil, 0, err2
|
return nil, 0, err2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newDocNumsI := newDocNums[itrI]
|
||||||
|
|
||||||
postItr = postings.iterator(postItr)
|
postItr = postings.iterator(postItr)
|
||||||
next, err2 := postItr.Next()
|
next, err2 := postItr.Next()
|
||||||
for next != nil && err2 == nil {
|
for next != nil && err2 == nil {
|
||||||
hitNewDocNum := newDocNums[itrI][next.Number()]
|
hitNewDocNum := newDocNumsI[next.Number()]
|
||||||
if hitNewDocNum == docDropped {
|
if hitNewDocNum == docDropped {
|
||||||
return nil, 0, fmt.Errorf("see hit with dropped doc num")
|
return nil, 0, fmt.Errorf("see hit with dropped doc num")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user