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

index out of range panic #142

Open
KaniuBillows opened this issue Mar 25, 2024 · 0 comments
Open

index out of range panic #142

KaniuBillows opened this issue Mar 25, 2024 · 0 comments

Comments

@KaniuBillows
Copy link

KaniuBillows commented Mar 25, 2024

Unable to reproduce through unit test for the time being, but it does exist in my application. I write a batch of documents to bluge through Batch, then query them and delete them. Then write new documents, keep looping. My program seems to crash randomly.

panic: runtime error: index out of range [559] with length 4

goroutine 13220 [running]:
github.com/blugelabs/bluge/index.(*segmentMerge).ProcessSegmentNow(0xc01e152330, 0xc001cf5108?, 0xc01a97c120, 0xc013d49cd8?)
	/root/go/pkg/mod/github.com/seafileltd/[email protected]/index/merge.go:272 +0x11c
github.com/blugelabs/bluge/index.(*Writer).introduceMerge(0xc002086480, 0xc01e152330, 0x66)
	/root/go/pkg/mod/github.com/seafileltd/[email protected]/index/introducer.go:261 +0x1e5
github.com/blugelabs/bluge/index.(*Writer).introducerLoop(0xc002086480, 0xc001c85800, 0xc001c858c0, 0xc001c85980, 0xc00bf50300, 0xc000482f98?)
	/root/go/pkg/mod/github.com/seafileltd/[email protected]/index/introducer.go:61 +0x24f
created by github.com/blugelabs/bluge/index.OpenWriter in goroutine 13055
	/root/go/pkg/mod/github.com/seafileltd/[email protected]/index/writer.go:127 +0x6b8

After reading the code, I found that this is related to cleaning up the old document when merging the segments, but I passed the unit test and failed to reproduce it. I really don't understand why it is accessed out of bounds, which may be related to the maintenance of bitmap?

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

No branches or pull requests

1 participant