Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if field exists within segment's visitStoredFields callback #105

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

abhinavdangeti
Copy link
Member

If there isn't an entry for a field within fieldsMap, fieldID
is set to -1 causing the following array lookup to panic ..

panic: runtime error: index out of range [-1]
goroutine 205 [running]:
github.com/blevesearch/zapx/v15.mergeStoredAndRemap.func2(0xc0076e2cf0, 0x27, 0x74, 0xc005d7cd3c, 0x15, 0x336b8, 0x0, 0x0, 0x0, 0x1)
/builds/gopath/pkg/mod/github.com/blevesearch/zapx/[email protected]/merge.go:722 +0x57b
github.com/blevesearch/zapx/v15.(*SegmentBase).visitStoredFields(0xc000770800, 0xc001c14000, 0x5d7, 0xc002777698, 0x2df, 0x0)
/builds/gopath/pkg/mod/github.com/blevesearch/zapx/[email protected]/segment.go:382 +0x39c

Ref: blevesearch/bleve#1648

If there isn't an entry for a field within fieldsMap, fieldID
is set to -1 causing the following array lookup to panic ..

```
panic: runtime error: index out of range [-1]
goroutine 205 [running]:
github.com/blevesearch/zapx/v15.mergeStoredAndRemap.func2(0xc0076e2cf0, 0x27, 0x74, 0xc005d7cd3c, 0x15, 0x336b8, 0x0, 0x0, 0x0, 0x1)
/builds/gopath/pkg/mod/github.com/blevesearch/zapx/[email protected]/merge.go:722 +0x57b
github.com/blevesearch/zapx/v15.(*SegmentBase).visitStoredFields(0xc000770800, 0xc001c14000, 0x5d7, 0xc002777698, 0x2df, 0x0)
/builds/gopath/pkg/mod/github.com/blevesearch/zapx/[email protected]/segment.go:382 +0x39c
```

Ref: blevesearch/bleve#1648
@abhinavdangeti abhinavdangeti changed the title Check if field exits within segment's visitStoredFields callback Check if field exists within segment's visitStoredFields callback Dec 22, 2021
@abhinavdangeti abhinavdangeti merged commit 071c505 into master Apr 25, 2023
@abhinavdangeti abhinavdangeti deleted the bleve#1648 branch April 25, 2023 22:06
abhinavdangeti added a commit that referenced this pull request May 16, 2023
#105)

If there isn't an entry for a field within fieldsMap, fieldID
is set to -1 causing the following array lookup to panic ..

```
panic: runtime error: index out of range [-1]
goroutine 205 [running]:
github.com/blevesearch/zapx/v15.mergeStoredAndRemap.func2(0xc0076e2cf0, 0x27, 0x74, 0xc005d7cd3c, 0x15, 0x336b8, 0x0, 0x0, 0x0, 0x1)
/builds/gopath/pkg/mod/github.com/blevesearch/zapx/[email protected]/merge.go:722 +0x57b
github.com/blevesearch/zapx/v15.(*SegmentBase).visitStoredFields(0xc000770800, 0xc001c14000, 0x5d7, 0xc002777698, 0x2df, 0x0)
/builds/gopath/pkg/mod/github.com/blevesearch/zapx/[email protected]/segment.go:382 +0x39c
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants