Skip to content

Commit 35947ea

Browse files
authored
Documentation changes related to the storage engine (#360)
* Remove unnecessary mentions of RocksDB * collection.any() presumably uses an optimization for retrieving a single document * Intermediate commits only apply to standalone AQL queries They are disabled for JavaScript Transactions and Stream Transactions, including AQL queries that run inside of such transactions. They are also disabled for batch operations in the Document API. * Cast startup option default values to string This prevents Hugo from rendering some numbers in scientific notation (e.g. 1.34217728e+08) * Apply to 3.10 and 3.11
1 parent 2571a2e commit 35947ea

File tree

60 files changed

+385
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+385
-385
lines changed

site/content/3.10/aql/data-queries.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,12 @@ On a single server, data modification operations are executed transactionally.
541541
If a data modification operation fails, any changes made by it are rolled
542542
back automatically as if they never happened.
543543

544-
If the RocksDB engine is used and intermediate commits are enabled, a query may
545-
execute intermediate transaction commits in case the running transaction (AQL
546-
query) hits the specified size thresholds. In this case, the query's operations
547-
carried out so far are committed and not rolled back in case of a later abort/rollback.
548-
That behavior can be controlled by adjusting the intermediate commit settings for
549-
the RocksDB engine.
544+
A query may execute intermediate transaction commits in case the running
545+
transaction (AQL query) hits the specified size thresholds. In this case, the
546+
query's operations carried out so far are committed and not rolled back in case
547+
of a later abort/rollback. This behavior can be controlled by adjusting the
548+
intermediate commit settings for the RocksDB engine. See
549+
[Known limitations for AQL queries](fundamentals/limitations.md#storage-engine-properties).
550550

551551
In a cluster, AQL data modification queries are not executed transactionally.
552552
Additionally, AQL queries with `UPDATE`, `REPLACE`, `UPSERT`, or `REMOVE`

site/content/3.10/aql/fundamentals/limitations.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: >-
77
they operate on, as well as design limitations to be aware of
88
archetype: default
99
---
10+
## Complexity limitations
11+
1012
The following hard-coded limitations exist for AQL queries:
1113

1214
- An AQL query cannot use more than _1000_ result registers.
@@ -37,7 +39,9 @@ of different collections. Please also consider that large queries (in terms of
3739
intermediate result size or final result size) can use considerable amounts of
3840
memory and may hit the configurable memory limits for AQL queries.
3941

40-
The following other limitations are known for AQL queries:
42+
## Design limitations
43+
44+
The following design limitations are known for AQL queries:
4145

4246
- Subqueries that are used inside expressions are pulled out of these
4347
expressions and executed beforehand. That means that subqueries do not
@@ -52,3 +56,50 @@ The following other limitations are known for AQL queries:
5256
[`WITH` statement](../high-level-operations/with.md). To make the `WITH` statement
5357
required in single server as well (e.g. for testing a migration to cluster),
5458
please start the server with the option `--query.require-with`.
59+
60+
## Storage engine properties
61+
62+
{{< info >}}
63+
The following restrictions and limitations do not apply to JavaScript Transactions
64+
and Stream Transactions, including AQL queries that run inside such transactions.
65+
Their intended use case is for smaller transactions with full transactional
66+
guarantees. So the following only applies to standalone AQL queries.
67+
{{< /info >}}
68+
69+
Data of ongoing transactions is stored in RAM. Transactions that get too big
70+
(in terms of number of operations involved or the total size of data created or
71+
modified by the transaction) are committed automatically. Effectively, this
72+
means that big user transactions are split into multiple smaller RocksDB
73+
transactions that are committed individually. The entire user transaction does
74+
not necessarily have ACID properties in this case.
75+
76+
The following startup options can be used to control the RAM usage and automatic
77+
intermediate commits for the RocksDB engine:
78+
79+
- `--rocksdb.max-transaction-size`
80+
81+
Transaction size limit (in bytes). Transactions store all keys and values in
82+
RAM, so large transactions run the risk of causing out-of-memory situations.
83+
This setting allows you to ensure that does not happen by limiting the size of
84+
any individual transaction. Transactions whose operations would consume more
85+
RAM than this threshold value will abort automatically with error 32 ("resource
86+
limit exceeded").
87+
88+
- `--rocksdb.intermediate-commit-size`
89+
90+
If the size of all operations in a transaction reaches this threshold, the transaction
91+
is committed automatically and a new transaction is started. The value is specified in bytes.
92+
93+
- `--rocksdb.intermediate-commit-count`
94+
95+
If the number of operations in a transaction reaches this value, the transaction is
96+
committed automatically and a new transaction is started.
97+
98+
The above values can also be adjusted per query, for example, by setting the
99+
following attributes in the call to `db._query()` in the JavaScript API:
100+
101+
- `maxTransactionSize`: transaction size limit in bytes
102+
- `intermediateCommitSize`: maximum total size of operations after which an intermediate
103+
commit is performed automatically
104+
- `intermediateCommitCount`: maximum number of operations after which an intermediate
105+
commit is performed automatically

site/content/3.10/aql/high-level-operations/for.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Also see [Combining queries with subqueries](../fundamentals/subqueries.md).
9393
## Options
9494

9595
For collections and Views, the `FOR` construct supports an optional `OPTIONS`
96-
clause to modify behavior. The general syntax is:
96+
clause to modify the behavior. The general syntax is as follows:
9797

9898
<pre><code>FOR <em>variableName</em> IN <em>expression</em> OPTIONS { <em>option</em>: <em>value</em>, <em>...</em> }</code></pre>
9999

site/content/3.10/aql/high-level-operations/insert.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@ FOR i IN 1..100
205205
On a single server, an insert operation is executed transactionally in an
206206
all-or-nothing fashion.
207207

208-
If the RocksDB engine is used and intermediate commits are enabled, a query may
209-
execute intermediate transaction commits in case the running transaction (AQL
210-
query) hits the specified size thresholds. In this case, the query's operations
211-
carried out so far will be committed and not rolled back in case of a later
212-
abort/rollback. That behavior can be controlled by adjusting the intermediate
213-
commit settings for the RocksDB engine.
208+
A query may execute intermediate transaction commits in case the running
209+
transaction (AQL query) hits the specified size thresholds. In this case, the
210+
query's operations carried out so far are committed and not rolled back in case
211+
of a later abort/rollback. This behavior can be controlled by adjusting the
212+
intermediate commit settings for the RocksDB engine. See
213+
[Known limitations for AQL queries](../fundamentals/limitations.md#storage-engine-properties).
214214

215215
For sharded collections, the entire query and/or insert operation may not be
216216
transactional, especially if it involves different shards and/or DB-Servers.

site/content/3.10/aql/high-level-operations/remove.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ FOR u IN users
175175
On a single server, the document removal is executed transactionally in an
176176
all-or-nothing fashion.
177177

178-
If the RocksDB engine is used and intermediate commits are enabled, a query may
179-
execute intermediate transaction commits in case the running transaction (AQL
180-
query) hits the specified size thresholds. In this case, the query's operations
181-
carried out so far will be committed and not rolled back in case of a later
182-
abort/rollback. That behavior can be controlled by adjusting the intermediate
183-
commit settings for the RocksDB engine.
178+
A query may execute intermediate transaction commits in case the running
179+
transaction (AQL query) hits the specified size thresholds. In this case, the
180+
query's operations carried out so far are committed and not rolled back in case
181+
of a later abort/rollback. This behavior can be controlled by adjusting the
182+
intermediate commit settings for the RocksDB engine. See
183+
[Known limitations for AQL queries](../fundamentals/limitations.md#storage-engine-properties).
184184

185185
For sharded collections, the entire query and/or remove operation may not be
186186
transactional, especially if it involves different shards and/or DB-Servers.

site/content/3.10/aql/high-level-operations/replace.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,12 @@ FOR u IN users
296296
On a single server, replace operations are executed transactionally in an
297297
all-or-nothing fashion.
298298

299-
If the RocksDB engine is used and intermediate commits are enabled, a query may
300-
execute intermediate transaction commits in case the running transaction (AQL
301-
query) hits the specified size thresholds. In this case, the query's operations
302-
carried out so far are committed and not rolled back in case of a later
303-
abort/rollback. That behavior can be controlled by adjusting the intermediate
304-
commit settings for the RocksDB engine.
299+
A query may execute intermediate transaction commits in case the running
300+
transaction (AQL query) hits the specified size thresholds. In this case, the
301+
query's operations carried out so far are committed and not rolled back in case
302+
of a later abort/rollback. This behavior can be controlled by adjusting the
303+
intermediate commit settings for the RocksDB engine. See
304+
[Known limitations for AQL queries](../fundamentals/limitations.md#storage-engine-properties).
305305

306306
For sharded collections, the entire query and/or replace operation may not be
307307
transactional, especially if it involves different shards and/or DB-Servers.

site/content/3.10/aql/high-level-operations/update.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,12 @@ FOR u IN users
419419
On a single server, updates are executed transactionally in an all-or-nothing
420420
fashion.
421421

422-
If the RocksDB engine is used and intermediate commits are enabled, a query may
423-
execute intermediate transaction commits in case the running transaction (AQL
424-
query) hits the specified size thresholds. In this case, the query's operations
425-
carried out so far are committed and not rolled back in case of a later
426-
abort/rollback. That behavior can be controlled by adjusting the intermediate
427-
commit settings for the RocksDB engine.
422+
A query may execute intermediate transaction commits in case the running
423+
transaction (AQL query) hits the specified size thresholds. In this case, the
424+
query's operations carried out so far are committed and not rolled back in case
425+
of a later abort/rollback. This behavior can be controlled by adjusting the
426+
intermediate commit settings for the RocksDB engine. See
427+
[Known limitations for AQL queries](../fundamentals/limitations.md#storage-engine-properties).
428428

429429
For sharded collections, the entire query and/or update operation may not be
430430
transactional, especially if it involves different shards and/or DB-Servers.

site/content/3.10/aql/high-level-operations/with.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ at the very start of the query.
4040

4141
## Usage
4242

43-
With RocksDB as storage engine, the `WITH` operation is only required if you
44-
use a cluster deployment and only for AQL queries that dynamically read from
45-
vertex collections as part of graph traversals.
43+
The `WITH` operation is only required if you use a cluster deployment and only
44+
for AQL queries that dynamically read from vertex collections as part of
45+
graph traversals.
4646

4747
You can enable the `--query.require-with` startup option to make single server
4848
instances require `WITH` declarations like cluster deployments to ease development,

site/content/3.10/deploy/architecture/storage-engine.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,21 @@ the same time, a write conflict is raised. It is possible to exclusively lock
3939
collections when executing AQL. This avoids write conflicts, but also inhibits
4040
concurrent writes.
4141

42-
ArangoDB uses RocksDB's transactions to implement the ArangoDB transaction
43-
handling. Therefore, the same restrictions apply for ArangoDB transactions when
44-
using the RocksDB engine.
45-
46-
RocksDB imposes a limit on the transaction size. It is optimized to
47-
handle small transactions very efficiently, but is effectively limiting
48-
the total size of transactions. If you have an operation that modifies a lot of
49-
documents, it is necessary to commit data in-between. This is done automatically
50-
for AQL by default. Transactions that get too big (in terms of number of
51-
operations involved or the total size of data modified by the transaction)
42+
ArangoDB uses RocksDB transactions to implement the transaction handling for
43+
standalone AQL queries (outside of JavaScript Transactions and Stream Transactions).
44+
45+
RocksDB imposes a limit on the transaction size. It is optimized to handle small
46+
transactions very efficiently, but is effectively limiting the total size of
47+
transactions. If you have an AQL query that modifies a lot of documents, it is
48+
necessary to commit data in-between. Transactions that get too big (in terms of
49+
number of operations involved or the total size of data modified by the transaction)
5250
are committed automatically. Effectively, this means that big user transactions
5351
are split into multiple smaller RocksDB transactions that are committed individually.
5452
The entire user transaction does not necessarily have ACID properties in this case.
5553

56-
The threshold values for transaction sizes can be configured globally using the
57-
startup options
58-
59-
- [`--rocksdb.intermediate-commit-size`](../../components/arangodb-server/options.md#--rocksdbintermediate-commit-size)
60-
61-
- [`--rocksdb.intermediate-commit-count`](../../components/arangodb-server/options.md#--rocksdbintermediate-commit-count)
62-
63-
- [`--rocksdb.max-transaction-size`](../../components/arangodb-server/options.md#--rocksdbmax-transaction-size)
64-
65-
It is also possible to override these thresholds per transaction.
54+
The threshold values for transaction sizes can be configured globally as well as
55+
overridden per transaction. See
56+
[Known limitations for AQL queries](../../aql/fundamentals/limitations.md#storage-engine-properties).
6657

6758
### Write-ahead log
6859

site/content/3.10/deploy/oneshard.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,13 @@ on the leader shards in a cluster, a few things need to be considered:
276276
- The collection option `writeConcern: 2` makes sure that a transaction is only
277277
successful if at least one follower shard is in sync with the leader shard,
278278
for a total of two shard replicas.
279-
- The RocksDB engine supports intermediate commits for larger document
280-
operations, potentially breaking the atomicity of transactions. To prevent
279+
- The RocksDB storage engine uses intermediate commits for larger document
280+
operations carried out by standalone AQL queries
281+
(outside of JavaScript Transactions and Stream Transactions).
282+
This potentially breaks the atomicity of transactions. To prevent
281283
this for individual queries you can increase `intermediateCommitSize`
282284
(default 512 MB) and `intermediateCommitCount` accordingly as query option.
285+
Also see [Known limitations for AQL queries](../aql/fundamentals/limitations.md#storage-engine-properties).
283286

284287
### Limitations
285288

0 commit comments

Comments
 (0)