mirror of https://gitee.com/bigwinds/arangodb
updated documentation
This commit is contained in:
parent
ba398494d0
commit
8d0d9d164c
12
CHANGELOG
12
CHANGELOG
|
@ -39,7 +39,17 @@ shards.
|
|||
|
||||
db._query("FOR i IN 1..100000 SORT i RETURN i", {}, { options: { memoryLimit: 100000 } });
|
||||
|
||||
* added startup option --query.memory-limit
|
||||
This option limits the default maximum amount of memory (in bytes) that a single
|
||||
AQL query can use.
|
||||
When a single AQL query reaches the specified limit value, the query will be
|
||||
aborted with a *resource limit exceeded* exception. In a cluster, the memory
|
||||
accounting is done per shard, so the limit value is effectively a memory limit per
|
||||
query per shard.
|
||||
|
||||
The global limit value can be overriden per query by setting the *memoryLimit*
|
||||
option value for individual queries when running an AQL query.
|
||||
|
||||
* added server startup option `--query.memory-limit`
|
||||
|
||||
* added convenience function to create vertex-centric indexes.
|
||||
Usage: `db.collection.ensureVertexCentricIndex("label", {type: "hash", direction: "outbound"})`
|
||||
|
|
|
@ -97,7 +97,10 @@ You also will find warnings in here; If you're designing queries on the shell be
|
|||
|
||||
To set a memory limit for the query, pass *options* to the *_query* method.
|
||||
The memory limit specifies the maximum number of bytes that the query is
|
||||
allowed to use:
|
||||
allowed to use. When a single AQL query reaches the specified limit value,
|
||||
the query will be aborted with a *resource limit exceeded* exception. In a
|
||||
cluster, the memory accounting is done per shard, so the limit value is
|
||||
effectively a memory limit per query per shard.
|
||||
|
||||
@startDocuBlockInline 02_workWithAQL_memoryLimit
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{02_workWithAQL_memoryLimit}
|
||||
|
@ -108,6 +111,10 @@ allowed to use:
|
|||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock 02_workWithAQL_memoryLimit
|
||||
|
||||
If no memory limit is specified, then the server default value (controlled by
|
||||
startup option *--query.memory-limit* will be used for restricting the maximum amount
|
||||
of memory the query can use. A memory limit value of *0* means that the maximum
|
||||
amount of memory for the query is not restricted.
|
||||
|
||||
### with _createStatement (ArangoStatement)
|
||||
|
||||
|
|
|
@ -198,3 +198,32 @@ Content-type: application/json; charset=utf-8
|
|||
"code" : 201
|
||||
}
|
||||
```
|
||||
|
||||
### Setting a memory limit
|
||||
|
||||
To set a memory limit for the query, the *memoryLimit* option can be passed to
|
||||
the server.
|
||||
The memory limit specifies the maximum number of bytes that the query is
|
||||
allowed to use. When a single AQL query reaches the specified limit value,
|
||||
the query will be aborted with a *resource limit exceeded* exception. In a
|
||||
cluster, the memory accounting is done per shard, so the limit value is
|
||||
effectively a memory limit per query per shard.
|
||||
|
||||
```js
|
||||
> curl --data @- -X POST --dump - http://localhost:8529/_api/cursor
|
||||
{ "query" : "FOR i IN 1..100000 SORT i RETURN i", "memoryLimit" : 100000 }
|
||||
|
||||
HTTP/1.1 500 Internal Server Error
|
||||
Server: ArangoDB
|
||||
Connection: Keep-Alive
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Content-Length: 115
|
||||
|
||||
{"error":true,"errorMessage":"query would use more memory than allowed (while executing)","code":500,"errorNum":32}
|
||||
```
|
||||
|
||||
If no memory limit is specified, then the server default value (controlled by
|
||||
startup option *--query.memory-limit* will be used for restricting the maximum amount
|
||||
of memory the query can use. A memory limit value of *0* means that the maximum
|
||||
amount of memory for the query is not restricted.
|
||||
|
||||
|
|
|
@ -329,6 +329,22 @@ directory as argument.
|
|||
@startDocuBlock databaseForceSyncProperties
|
||||
|
||||
|
||||
### Limiting memory for AQL queries
|
||||
|
||||
`--query.memory-limit value`
|
||||
|
||||
The default maximum amount of memory (in bytes) that a single AQL query can use.
|
||||
When a single AQL query reaches the specified limit value, the query will be
|
||||
aborted with a *resource limit exceeded* exception. In a cluster, the memory
|
||||
accounting is done per shard, so the limit value is effectively a memory limit per
|
||||
query per shard.
|
||||
|
||||
The global limit value can be overriden per query by setting the *memoryLimit*
|
||||
option value for individual queries when running an AQL query.
|
||||
|
||||
The default value is *0*, meaning that there is no memory limit.
|
||||
|
||||
|
||||
### Enable/disable AQL query tracking
|
||||
|
||||
`--query.tracking flag`
|
||||
|
|
|
@ -46,6 +46,11 @@ not present, it will be created.
|
|||
<!-- arangod/Wal/LogfileManager.h -->
|
||||
@startDocuBlock WalLogfileSyncInterval
|
||||
|
||||
### Flush timeout
|
||||
|
||||
<!-- arangod/Wal/LogfileManager.h -->
|
||||
@startDocuBlock WalLogfileFlushTimeout
|
||||
|
||||
### Throttling
|
||||
|
||||
<!-- arangod/Wal/LogfileManager.h -->
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
@startDocuBlock WalLogfileFlushTimeout
|
||||
@brief WAL flush timeout
|
||||
`--wal.flush-timeout
|
||||
|
||||
The timeout (in milliseconds) that ArangoDB will at most wait when flushing
|
||||
a full WAL logfile to disk. When the timeout is reached and the flush is
|
||||
not completed, the operation that requested the flush will fail with a
|
||||
*lock timeout* error.
|
||||
@endDocuBlock
|
||||
|
Loading…
Reference in New Issue