Reduces the number of operations in a transaction to 64.

This commit is contained in:
James Phillips 2016-05-14 21:40:46 -07:00
parent 778b975e7a
commit 653387637a
2 changed files with 3 additions and 4 deletions

View File

@ -14,7 +14,7 @@ const (
// maxTxnOps is used to set an upper limit on the number of operations
// inside a transaction. If there are more operations than this, then the
// client is likely abusing transactions.
maxTxnOps = 500
maxTxnOps = 64
)
// decodeValue decodes the value member of the given operation.

View File

@ -182,7 +182,8 @@ query parameters will be ignored, since writes are always managed by the leader
the Raft consensus protocol.
The body of the request should be a list of operations to perform inside the atomic
transaction, which looks like this:
transaction. Up to 64 operations may be present in a single transaction. Operations
look like this:
```javascript
[
@ -200,8 +201,6 @@ transaction, which looks like this:
]
```
Up to 500 operations may be present in a single transaction.
`KV` is the only available operation type, though other types of operations may be added
in future versions of Consul to be mixed with key/value operations. The following fields
are available: