Skip to content

Commit

Permalink
fix: #401
Browse files Browse the repository at this point in the history
  • Loading branch information
asabya committed Jan 10, 2023
1 parent a39f901 commit 27e6331
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/collection/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -1047,9 +1047,8 @@ func (d *Document) Find(dbName, expr, podPassword string, limit int) ([][]byte,
d.logger.Errorf("finding from document db: ", ErrInvalidIndexType)
return nil, ErrInvalidIndexType
}

docs := [][]byte{}
if idx.mutable {
var docs [][]byte
wg := new(sync.WaitGroup)
mtx := &sync.Mutex{}
for _, ref := range references {
Expand All @@ -1068,7 +1067,6 @@ func (d *Document) Find(dbName, expr, podPassword string, limit int) ([][]byte,
d.logger.Info("found document from document db: ", dbName, expr, len(docs))
return docs, nil
} else { // skipcq: TCV-001
var docs [][]byte
for _, ref := range references {
if limit > 0 && len(docs) >= limit {
break
Expand Down

0 comments on commit 27e6331

Please sign in to comment.