Skip to content

Commit 7e7847d

Browse files
authored
Merge pull request #100 from scylladb/avoid_okbucket_int32_overflow
gemini: ensure max pk per bucket in valid range
2 parents 76a426c + 7527734 commit 7e7847d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Gemini ensures that primary key buckets do not overflow int32.
56
- Gemini now accepts a list of node host names or IPs for the test
67
and Oracle clusters.
78
- Default maximum primary keys increased to MAX_INT32/concurrency.

Diff for: cmd/gemini/root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func readSchema(confFile string) (*gemini.Schema, error) {
128128
}
129129

130130
func run(cmd *cobra.Command, args []string) {
131-
if pkNumberPerThread == 0 {
131+
if pkNumberPerThread <= 0 || pkNumberPerThread > (math.MaxInt32/concurrency) {
132132
pkNumberPerThread = math.MaxInt32 / concurrency
133133
}
134134
if err := printSetup(); err != nil {

0 commit comments

Comments
 (0)