home shape

ArangoDB 2.8 API Changes: What You Need to Know

There are a few API changes coming in the next 2.8 release. Please have a look if you contribute to a language driver or client-side query builder for ArangoDB.

AQL keywords added

The following AQL keywords were added in ArangoDB 2.8:

  • GRAPH
  • OUTBOUND
  • INBOUND
  • ANY
  • ALL
  • NONE

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.

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 IndexRangeNodes 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.

Jan Steemann

Jan Steemann

After more than 30 years of playing around with 8 bit computers, assembler and scripting languages, Jan decided to move on to work in database engineering. Jan is now a senior C/C++ developer with the ArangoDB core team, being there from version 0.1. He is mostly working on performance optimization, storage engines and the querying functionality. He also wrote most of AQL (ArangoDB’s query language).

Leave a Comment





Get the latest tutorials, blog posts and news: