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 [-2] errors on Zipfian generator #288

Open
filipecosta90 opened this issue Sep 14, 2023 · 0 comments
Open

index out of range [-2] errors on Zipfian generator #288

filipecosta90 opened this issue Sep 14, 2023 · 0 comments

Comments

@filipecosta90
Copy link
Contributor

I'm seeing deterministic errors around the Zipfian generation when I need to generate hundreds of millions of random numbers.
Here's a sample:

panic: runtime error: index out of range [-2]
goroutine 1387 [running]:
math/rand.(*rngSource).Uint64(...)
	/usr/local/go/src/math/rand/rng.go:249
math/rand.(*rngSource).Int63(0xc0000d45a0?)
	/usr/local/go/src/math/rand/rng.go:234 +0x92
math/rand.(*Rand).Int63(...)
	/usr/local/go/src/math/rand/rand.go:96
math/rand.(*Rand).Float64(...)
	/usr/local/go/src/math/rand/rand.go:207
github.com/pingcap/go-ycsb/pkg/generator.(*Zipfian).next(0xc49960f560, 0xc0000e1830, 0x1)
	/go/pkg/mod/github.com/pingcap/[email protected]/pkg/generator/zipfian.go:151 +0x4e
github.com/pingcap/go-ycsb/pkg/generator.(*Zipfian).Next(...)
	/go/pkg/mod/github.com/pingcap/[email protected]/pkg/generator/zipfian.go:169

In the next couple of days I'll isolate this and reply back but wanted to have this placeholder to keep track of this issue.

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