ArangoDB 2.8 - API changes

41 views
Skip to first unread message

Ingo Friepoertner

unread,
Dec 7, 2015, 6:56:26 AM12/7/15
to ArangoDB
- Deadlock handling / New error code 29

Client applications should be prepared to handle error 29 (`deadlock detected`)
that ArangoDB may now throw when it detects a deadlock across multiple transactions.
When a client application receives error 29, it should retry the operation that
failed.

The error can only occur for AQL queries or user transactions that involve
more than a single collection.


- Query optimizer execution plan explain output

The AQL execution node type `IndexRangeNode` was replaced with a new more capable
execution node type `IndexNode`. That means in execution plan explain output there
will be no more `IndexRangeNode`s but only `IndexNode`. This affects explain output
that can be retrieved via `require("org/arangodb/aql/explainer").explain(query)`,
`db._explain(query)`, and the HTTP query explain API.

The optimizer rule that makes AQL queries actually use indexes was also renamed
from `use-index-range` to `use-indexes`. Again this affects explain output
that can be retrieved via `require("org/arangodb/aql/explainer").explain(query)`,
`db._explain(query)`, and the HTTP query explain API.


- HTTP cancel operation changed HTTP return code

When a server-side operation got canceled due to an explicit client cancel request
via HTTP `DELETE /_api/job`, previous versions of ArangoDB returned an HTTP status
code of 408 (request timeout) for the response of the canceled operation.

The HTTP return code 408 has caused problems with some client applications. Some
browsers (e.g. Chrome) handled a 408 response by resending the original request,
which is the opposite of what is desired when a job should be canceled.

Therefore ArangoDB will return HTTP status code 410 (gone) for canceled operations
from version 2.8 on.


- AQL keywords added

The following AQL keywords were added in ArangoDB 2.8:

* `GRAPH`
* `OUTBOUND`
* `INBOUND`
* `ANY`
* `ALL`

Usage of these keywords for collection names, variable names or attribute names
in AQL queries will not be possible without quoting. For example, the following
AQL query will still work as it uses a quoted collection name and a quoted
attribute name:

```
FOR doc IN `OUTBOUND`
  RETURN doc.`any`
```

This may be relevant for client-side query builders.
Reply all
Reply to author
Forward
0 new messages