fix two missing Close calls holding iterators open
This commit is contained in:
parent
8bcf6adb60
commit
45a7a6dd8e
@ -553,6 +553,7 @@ func (udc *UpsideDownCouch) Document(id string) (*document.Document, error) {
|
||||
storedRow := NewStoredRow(id, 0, []uint64{}, 'x', nil)
|
||||
storedRowScanPrefix := storedRow.ScanPrefixForDoc()
|
||||
it := udc.store.Iterator(storedRowScanPrefix)
|
||||
defer it.Close()
|
||||
key, val, valid := it.Current()
|
||||
for valid {
|
||||
if !bytes.HasPrefix(key, storedRowScanPrefix) {
|
||||
|
@ -305,6 +305,7 @@ func (i *indexImpl) Search(req *SearchRequest) (*SearchResult, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer searcher.Close()
|
||||
|
||||
if req.Facets != nil {
|
||||
facetsBuilder := search.NewFacetsBuilder(i.i)
|
||||
|
Loading…
Reference in New Issue
Block a user