Skip to content

Commit

Permalink
Add KV transaction limits (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
losfair committed Aug 12, 2024
1 parent 9860bb9 commit 931f3de
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions deploy/kv/manual/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,19 @@ atomic operation, setting the new balances with the versionstamp constraints. If
the transaction is successful, the loop exits. If the version constraints are
violated, the transaction fails, and the loop retries the transaction until it
succeeds.

## Limits

In addition to a max key size of 2 KiB and max value size of 64 KiB, there are
certain limits with the Deno KV transaction API:

- **Max keys per `kv.getMany()`**: 10
- **Max limit per `kv.list()`**: 1000
- **Max checks in an atomic operation**: 100
- **Max mutations in an atomic operation**: 1000
- **Max total size of an atomic operation**: 800 KiB. This includes all keys and
values in checks and mutations, and encoding overhead counts toward this limit
as well.
- **Max total size of keys**: 90 KiB. This includes all keys in checks and
mutations, and encoding overhead counts toward this limit as well.
- **Max watched keys per `kv.watch()`**:10

0 comments on commit 931f3de

Please sign in to comment.