0
0
Fork 0

Merge pull request #742 from steveyen/scorch-unlock-needed

scorch unlocks in introduceSegment's DocNumbers() error codepath
This commit is contained in:
Marty Schoch 2018-01-23 12:09:23 -05:00 committed by GitHub
commit 0fc9b4b74a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ func (s *Scorch) introduceSegment(next *segmentIntroduction) error {
var err error
delta, err = s.root.segment[i].segment.DocNumbers(next.ids)
if err != nil {
s.rootLock.Unlock()
next.applied <- fmt.Errorf("error computing doc numbers: %v", err)
close(next.applied)
_ = newSnapshot.DecRef()