Skip to content

Commit

Permalink
Merge #126155
Browse files Browse the repository at this point in the history
126155: perf: leverage insert-start flag in ycsb init r=nvanbenschoten a=ajstorm

The ycsb workload has the ability to bias key values based on a supplied --insert-start flag. When provided, all key indexes will be added after the insert-start point. Until now however, this flag wasn't properly plumbed into the init path and was only used during workload run.

This commit plumbs the flag into the init path, so that it can be used to seed databases with different row sets during database creation.

Epic: none
Release note: none

Co-authored-by: Adam Storm <[email protected]>
  • Loading branch information
craig[bot] and ajstorm committed Jun 27, 2024
2 parents ecd6ff8 + 1a42b07 commit 5769b24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/workload/ycsb/ycsb.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func (g *ycsb) Tables() []workload.Table {
for rowIdx := rowBegin; rowIdx < rowEnd; rowIdx++ {
rowOffset := rowIdx - rowBegin

key.Set(rowOffset, []byte(w.buildKeyName(uint64(rowIdx))))
key.Set(rowOffset, []byte(w.buildKeyName(uint64(g.insertStart+rowIdx))))

for i := range fields {
randStringLetters(rng, tmpbuf[:])
Expand Down

0 comments on commit 5769b24

Please sign in to comment.