I am able to connect to the coordinator of my ArangoDB cluster using the following:
Everything works (CRUD, querying, etc.), except when I try to create an index I get a "Lock Timeout" error:
10.32.0.15:1027@_system> db.imdb_vertices.ensureIndex({ type: "skiplist", fields: ["name"] })
JavaScript exception in file '/usr/share/arangodb3/js/client/modules/@arangodb/arangosh.js' at 100,7: ArangoError 18: : lock timeout
! throw error;
! ^
stacktrace: ArangoError: : lock timeout
at Object.exports.checkRequestResult (/usr/share/arangodb3/js/client/modules/@arangodb/arangosh.js:98:21)
at ArangoCollection.ensureIndex (/usr/share/arangodb3/js/client/modules/@arangodb/arango-collection.js:738:12)
at <shell command>:1:18
10.32.0.15:1027@_system>
I get the same error when I try to create the index over HTTP:
$ curl -X POST --data-binary @- --dump - http://10.32.0.15:1027/_api/index?collection=imdb_vertices << EOF
{
"type" : "skiplist",
"fields" : [
"name",
"genre"
]
}
EOF
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Server: ArangoDB
Connection: Keep-Alive
Content-Length: 71
{"error":true,"code":400,"errorNum":18,"errorMessage":": lock timeout"}
From the docs, I see "Will be raised when there's a timeout waiting for a lock." is listed as the cause of the error. However, I am unable to find a solution. Any hints?
Thanks!
(Cross posted from stack overflow here).
127.0.0.1:8529@_system> require("@arangodb/aql/queries").current();
on the coordinator to check for running queries.
10.32.0.15:1027@_system> require("@arangodb/aql/queries").current();[ { "id" : "12919", "query" : "FOR s IN imdb_vertices FOR t IN imdb_vertices FILTER s._id < t._id LET p = SUM((...", "started" : "2016-07-15T18:44:24Z", "runTime" : 213152.8452320099, "state" : "executing" }, { "id" : "12912", "query" : "FOR s IN imdb_vertices FOR t IN imdb_vertices FILTER s._id < t._id LET p = SUM((...", "started" : "2016-07-15T18:43:27Z", "runTime" : 213209.77132701874, "state" : "executing" } ]
db._query("FOR x in imdb_edges FILTER x.$label == \"DIRECTED\" COLLECT director = DOCUMENT(x._from), movie = DOCUMENT(x._to) FILTER director.name LIKE 'A%' AND movie.genre == 'Drama' RETURN director").toArray()
FILTER edge.$label == 'DIRECTED'
FILTER movie.genre == 'Drama'
FILTER edge.$label == 'DIRECTED' AND movie.genre == 'Drama'
Multiple FILTER operations like that are AND combined, so really just code style: