简体   繁体   中英

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.0/HTTP/Gharial/Management.html#add-vertex-collection there is a mention about waitForSync in "Return Codes" section.

  • 201: Returned if the edge collection could be added successfully and waitForSync is true.
  • 202: Returned if the edge collection could be added successfully and waitForSync is false.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM