Frage

If my application initiates a long-running (minutes) query in Orientdb, can it be (programmatically) interrupted or aborted at my discretion - and without killing the server?

I searched the orientdb documentation, google group, and the web and haven’t been able to confirm whether this feature exists or not. Sometimes a feature like this exists, but is not easily discovered.

Some graph DB’s have a “TIMEOUT” configuration; however, even this would not satisfy my requirement to abort the query at my discretion (any time.)

In my application (and many others I would think?) the user may change his mind and select some other feature that effectively requires a new query of the (large) graph, and makes the first query unnecessary. We don’t want to leave that query running and consuming resources. We also don’t want to lose other pending queries or have to restart the server.

War es hilfreich?

Lösung

We recently introduced a new HTTP command (not yet documented because used internally by Studio, but your question demonstrate that could be useful to users too):

HTTP POST against /connection/<command>/<id>

Where:

  • command can be:
    • kill to kill a connection
    • interrupt to interrupt the operation (if possible)
  • id, as the connection id. To know all the connections use GET /connections/[<db>]

You've to execute this command authenticated in the OrientDB Server realm (no database realm), so get the root password from config/orientdb-server-config.xml file (last section).

In your case use interrupt.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top