Skip to content

Commit

Permalink
Merge pull request #100 from scylladb/avoid_okbucket_int32_overflow
Browse files Browse the repository at this point in the history
gemini: ensure max pk per bucket in valid range
  • Loading branch information
penberg authored May 16, 2019
2 parents 76a426c + 7527734 commit 7e7847d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Gemini ensures that primary key buckets do not overflow int32.
- Gemini now accepts a list of node host names or IPs for the test
and Oracle clusters.
- Default maximum primary keys increased to MAX_INT32/concurrency.
Expand Down
2 changes: 1 addition & 1 deletion cmd/gemini/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func readSchema(confFile string) (*gemini.Schema, error) {
}

func run(cmd *cobra.Command, args []string) {
if pkNumberPerThread == 0 {
if pkNumberPerThread <= 0 || pkNumberPerThread > (math.MaxInt32/concurrency) {
pkNumberPerThread = math.MaxInt32 / concurrency
}
if err := printSetup(); err != nil {
Expand Down

0 comments on commit 7e7847d

Please sign in to comment.