Skip to content

Commit

Permalink
Merge pull request #153 from scylladb/partitioning_scheme_configurabl…
Browse files Browse the repository at this point in the history
…e_buffers

gemini: partition key buffers size configurable
  • Loading branch information
Henrik Johansson authored Jul 2, 2019
2 parents 9e5880b + b0aa6c2 commit c1afadd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Unreleased

- The size of the partition key buffers can be configured on the commandline through
`partition-key-buffer-size` and `partition-key-buffer-reuse-size`.

## 1.3.0

- Partitioning bewteen workers are now handled by a `generator` that generates
Expand Down
8 changes: 6 additions & 2 deletions cmd/gemini/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ var (
level string
maxRetriesMutate int
maxRetriesMutateSleep time.Duration
pkBufferSize uint64
pkBufferReuseSize uint64
)

const (
Expand Down Expand Up @@ -368,8 +370,8 @@ func runJob(f testJob, schema *gemini.Schema, schemaConfig *gemini.SchemaConfig,
Partitions: &partitionRangeConfig,
Size: concurrency,
Seed: seed,
PkBufferSize: 10000,
PkUsedBufferSize: 100000,
PkBufferSize: pkBufferSize,
PkUsedBufferSize: pkBufferReuseSize,
}
g := gemini.NewGenerator(gCfg)
gs = append(gs, g)
Expand Down Expand Up @@ -627,6 +629,8 @@ func init() {
rootCmd.Flags().StringVarP(&level, "level", "", "info", "Specify the logging level, debug|info|warn|error|dpanic|panic|fatal")
rootCmd.Flags().IntVarP(&maxRetriesMutate, "max-mutation-retries", "", 2, "Maximum number of attempts to apply a mutation")
rootCmd.Flags().DurationVarP(&maxRetriesMutateSleep, "max-mutation-retries-backoff", "", 10*time.Millisecond, "Duration between attempts to apply a mutation for example 10ms or 1s")
rootCmd.Flags().Uint64VarP(&pkBufferSize, "partition-key-buffer-size", "c", 1000, "Number of buffered partition keys")
rootCmd.Flags().Uint64VarP(&pkBufferReuseSize, "partition-key-buffer-reuse-size", "c", 2000, "Number of reused buffered partition keys")
}

func printSetup() error {
Expand Down

0 comments on commit c1afadd

Please sign in to comment.