etcdserver: add --max-txn-ops flag

--max-txn-ops allows users to define the maximum transaction operations
for each txn request. it defaults at 128.

Fixes #7826
This commit is contained in:
fanmin shi
2017-05-23 17:50:20 -07:00
parent f75e333264
commit ae7ddfb483
8 changed files with 20 additions and 10 deletions

View File

@ -41,7 +41,7 @@ func TestTxnError(t *testing.T) {
t.Fatalf("expected %v, got %v", rpctypes.ErrDuplicateKey, err)
}
ops := make([]clientv3.Op, v3rpc.MaxOpsPerTxn+10)
ops := make([]clientv3.Op, v3rpc.MaxTxnOps+10)
for i := range ops {
ops[i] = clientv3.OpPut(fmt.Sprintf("foo%d", i), "")
}