mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tools/benchmark: exit when txn-ops is larger than key-space-size to avoid key duplicated error. (#11499)
This commit is contained in:
parent
e6980b1f9f
commit
6ffd9f659e
@ -61,6 +61,12 @@ func txnPutFunc(cmd *cobra.Command, args []string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if txnPutOpsPerTxn > keySpaceSize {
|
||||
fmt.Fprintf(os.Stderr, "expected --txn-ops no larger than --key-space-size, "+
|
||||
"got txn-ops(%v) key-space-size(%v)\n", txnPutOpsPerTxn, keySpaceSize)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
requests := make(chan []v3.Op, totalClients)
|
||||
if txnPutRate == 0 {
|
||||
txnPutRate = math.MaxInt32
|
||||
|
Loading…
x
Reference in New Issue
Block a user