diff --git a/Documentation/DocuBlocks/Rest/Administration/delete_api_shutdown.md b/Documentation/DocuBlocks/Rest/Administration/delete_api_shutdown.md index 9fbdf2718ee7..16b9f378a80a 100644 --- a/Documentation/DocuBlocks/Rest/Administration/delete_api_shutdown.md +++ b/Documentation/DocuBlocks/Rest/Administration/delete_api_shutdown.md @@ -4,8 +4,35 @@ @RESTHEADER{DELETE /_admin/shutdown, Initiate shutdown sequence, RestShutdownHandler} +@RESTQUERYPARAMETERS + +@RESTQUERYPARAM{soft,boolean,optional} +Introduced in: v3.7.12, v3.8.1, v3.9.0 + +If set to `true`, this initiates a soft shutdown. This is only available +on Coordinators. When issued, the Coordinator tracks a number of ongoing +operations, waits until all have finished, and then shuts itself down +normally. In the meantime, new operations of these types are no longer +accepted and a 503 response is sent instead. However, further requests +to finish the ongoing operations are allowed. This feature can be used +to make restart operations of Coordinators less intrusive for clients. + +The following types of operations are tracked: + + - AQL cursors (in particular streaming cursors) + - Transactions (in particular stream transactions) + - Pregel runs (conducted by this Coordinator) + - Ongoing asynchronous requests (using the `x-arango-async: store` HTTP header + - Finished asynchronous requests, whose result has not yet been + collected + - Queued low priority requests (most normal requests) + - Ongoing low priority requests + +Note that the latter two are tracked but not prevented from being +started, to allow for finishing operations. + @RESTDESCRIPTION -This call initiates a clean shutdown sequence. Requires administrive privileges +This call initiates a clean shutdown sequence. Requires administrive privileges. @RESTRETURNCODES diff --git a/Documentation/DocuBlocks/Rest/Administration/get_api_shutdown.md b/Documentation/DocuBlocks/Rest/Administration/get_api_shutdown.md new file mode 100644 index 000000000000..213e4195fc75 --- /dev/null +++ b/Documentation/DocuBlocks/Rest/Administration/get_api_shutdown.md @@ -0,0 +1,59 @@ + +@startDocuBlock get_api_shutdown +@brief query progress of soft shutdown process + +@RESTHEADER{GET /_admin/shutdown, Query progress of soft shutdown process, RestGetShutdownHandler} + +@RESTDESCRIPTION +Introduced in: v3.7.12, v3.8.1, v3.9.0 + +This call reports progress about a soft Coordinator shutdown (see +documentation of `DELETE /_admin/shutdown?soft=true`). +In this case, the following types of operations are tracked: + + - AQL cursors (in particular streaming cursors) + - Transactions (in particular stream transactions) + - Pregel runs (conducted by this Coordinator) + - Ongoing asynchronous requests (using the `x-arango-async: store` HTTP header + - Finished asynchronous requests, whose result has not yet been + collected + - Queued low priority requests (most normal requests) + - Ongoing low priority requests + +This API is only available on Coordinators. + +@RESTRETURNCODES + +@RESTRETURNCODE{200} +The response indicates the fact that a soft shutdown is ongoing and the +number of active operations of the various types. Once all numbers have gone +to 0, the flag `allClear` is set and the Coordinator shuts down automatically. + +@RESTREPLYBODY{softShutdownOngoing,boolean,required,} +Whether a soft shutdown of the Coordinator is in progress. + +@RESTREPLYBODY{AQLcursors,number,required,} +Number of AQL cursors that are still active. + +@RESTREPLYBODY{transactions,number,required,} +Number of ongoing transactions. + +@RESTREPLYBODY{pendingJobs,number,required,} +Number of ongoing asynchronous requests. + +@RESTREPLYBODY{doneJobs,number,required,} +Number of finished asynchronous requests, whose result has not yet been collected. + +@RESTREPLYBODY{pregelConductors,number,required,} +Number of ongoing Pregel jobs. + +@RESTREPLYBODY{lowPrioOngoingRequests,number,required,} +Number of queued low priority requests. + +@RESTREPLYBODY{lowPrioQueuedRequests,number,required,} +Number of ongoing low priority requests. + +@RESTREPLYBODY{allClear,boolean,required,} +Whether all active operations finished. + +@endDocuBlock