Skip to main content
Loading

Use AQL with strong consistency

There are several commands you should be aware of if you're using AQL with a namespace configured in strong consistency (SC) mode. Verify that you are running Aerospike Tools release 3.15.3.2 or later.

AQL durable delete

In order to delete data from an SC namespace, you will almost certainly wish to use a durable delete. Expunge deletes, which recover storage immediately at the cost of consistency, are not allowed by default, and will result in a FORBIDDEN error. However, these deletes are the default in AQL.

In order to have AQL generate durable deletes:

aql> set DURABLE_DELETE true

This will cause subsequent deletes in the same AQL session to be executed with the delete flag.

AQL linearize

In order to have reads, i.e. SELECT in AQL, be executed with the linearize flag:

aql> set LINEARIZE_READ true

All subsequent primary key select commands will be executed with linearize read policy.

Linearize is only supported on primary key requests, not on queries. They only apply when using the "PK =" SELECT form.

AQL error codes

As AQL is often used in initial use to diagnose and validate a configuration, please understand the distinction between the error codes: PARTITION_UNAVAILABLE, INVALID_NODE_ERROR, TIMEOUT, and CONNECTION_ERROR.

These error codes are described in the strong consistency feature guide.