hnakamur
hnakamur

Reputation: 541

Is the query parameter waitForSync supported in all modification APIs in ArangoDB?

For example, in the documentation of the API for adding a vertex collection https://docs.arangodb.com/3.11/develop/http/graphs/named-graphs/#add-a-vertex-collection there is a mention about waitForSync in "Return Codes" section.

However there is no "Query Parameter" section for this API.

Actually I tried to add waitForSync=true for this API, but I got result code 202, not 201 which I expected. https://github.com/hnakamur/arangogo/blob/e6906759bead9857424782b4ab294ad4992bf1a9/cmd/example2/main.go#L103-L109

Upvotes: 0

Views: 97

Answers (1)

mchacki
mchacki

Reputation: 3267

Hi waitForSync is supported for all API's that modify data on the server. So creating and updating documents for instance.

waitForSync is not supported for administrative things on the server like creating new collections, this will always waitForSync (because it has to write the physical containers for the data)

In the graph case your API will probably create document or edge collections if they do not exist already. This is always a synchronous task.

Upvotes: 1

Related Questions