8000 Soft coordinator shutdown documentation by neunhoef · Pull Request #716 · arangodb/docs · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Soft coordinator shutdown documentation #716

Merged
merged 4 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 3.7/http/miscellaneous-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This is an overview of ArangoDB's HTTP interface for miscellaneous functions.
<!-- lib/Admin/RestShutdownHandler.cpp -->
{% docublock delete_api_shutdown %}

<!-- lib/Admin/RestShutdownHandler.cpp -->
{% docublock get_api_shutdown %}

<!-- js/actions/api-system.js -->
{% docublock post_admin_execute %}

Expand Down
3 changes: 3 additions & 0 deletions 3.8/http/miscellaneous-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This is an overview of ArangoDB's HTTP interface for miscellaneous functions.
<!-- lib/Admin/RestShutdownHandler.cpp -->
{% docublock delete_api_shutdown %}

<!-- lib/Admin/RestShutdownHandler.cpp -->
{% docublock get_api_shutdown %}

<!-- js/actions/api-system.js -->
{% docublock post_admin_execute %}

Expand Down
91 changes: 90 additions & 1 deletion 3.9/generated/allComments.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34630,8 +34630,35 @@ This API will return HTTP 200 if everything is ok

@RESTHEADER{DELETE /_admin/shutdown, Initiate shutdown sequence, RestShutdownHandler}

@RESTQUERYPARAMETERS

@RESTQUERYPARAM{soft,boolean,optional}
<small>Introduced in: v3.7.12, v3.8.1, v3.9.0</small>

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

Expand All @@ -34641,6 +34668,68 @@ is returned in all cases, `OK` will be returned in the result buffer on success.
@endDocuBlock


<!-- filename: /work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/get_api_shutdown.md -->
@startDocuBlock get_api_shutdown

@brief query progress of soft shutdown process

@RESTHEADER{GET /_admin/shutdown, Query progress of soft shutdown process, RestGetShutdownHandler}

@RESTDESCRIPTION
<small>Introduced in: v3.7.12, v3.8.1, v3.9.0</small>

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


<!-- filename: /work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/post_admin_server_jwt.md -->
@startDocuBlock post_admin_server_jwt

Expand Down
90 changes: 88 additions & 2 deletions 3.9/generated/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3694,6 +3694,60 @@
"type": "object",
"x-filename": "/work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/get_api_return.md"
},
"get_api_shutdown_rc_200": {
"properties": {
"AQLcursors": {
"description": "Number of AQL cursors that are still active.\n\n",
"format": "",
"type": "number"
},
"allClear": {
"description": "Whether all active operations finished.\n\n\n",
"format": "",
"type": "boolean"
},
"doneJobs": {
"description": "Number of finished asynchronous requests, whose result has not yet been collected.\n\n",
"format": "",
"type": "number"
},
"lowPrioOngoingRequests": {
"description": "Number of queued low priority requests.\n\n",
"format": "",
"type": "number"
},
"lowPrioQueuedRequests": {
"description": "Number of ongoing low priority requests.\n\n",
"format": "",
"type": "number"
},
"pendingJobs": {
"description": "Number of ongoing asynchronous requests.\n\n",
"format": "",
"type": "number"
},
"pregelConductors": {
"description": "Number of ongoing Pregel jobs.\n\n",
"format": "",
"type": "number"
},
"softShutdownOngoing": {
"description": "Whether a soft shutdown of the Coordinator is in progress.\n\n",
"format": "",
"type": "boolean"
},
"transactions": {
"description": "Number of ongoing transactions.\n\n",
"format": "",
"type": "number"
}
},
"required": [
"softShutdownOngoing"
],
"type": "object",
"x-filename": "/home/simran/oskar2/work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/get_api_shutdown.md"
},
"get_api_tasks_all_rc_200": {
"description": "a list of all tasks\n\n",
"items": {
Expand Down Expand Up @@ -7124,9 +7178,17 @@
},
"/_admin/shutdown": {
"delete": {
"description": "\n\nThis call initiates a clean shutdown sequence. Requires administrive privileges\n\n",
"description": "\n\nThis call initiates a clean shutdown sequence. Requires administrive privileges.\n\n",
"operationId": "RestShutdownHandler",
"parameters": [],
"parameters": [
{
"description": "<small>Introduced in: v3.7.12, v3.8.1, v3.9.0</small>\n\nIf set to `true`, this initiates a soft shutdown. This is only available\non Coordinators. When issued, the Coordinator tracks a number of ongoing\noperations, waits until all have finished, and then shuts itself down\nnormally. In the meantime, new operations of these types are no longer\naccepted and a 503 response is sent instead. However, further requests\nto finish the ongoing operations are allowed. This feature can be used\nto make restart operations of Coordinators less intrusive for clients.\n\nThe following types of operations are tracked:\n\n - AQL cursors (in particular streaming cursors)\n - Transactions (in particular stream transactions)\n - Pregel runs (conducted by this Coordinator)\n - Ongoing asynchronous requests (using the `x-arango-async: store` HTTP header\n - Finished asynchronous requests, whose result has not yet been\n collected\n - Queued low priority requests (most normal requests)\n - Ongoing low priority requests\n\nNote that the latter two are tracked but not prevented from being\nstarted, to allow for finishing operations.\n\n",
"in": "query",
"name": "soft",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "is returned in all cases, `OK` will be returned in the result buffer on success.\n\n\n"
Expand All @@ -7139,6 +7201,30 @@
"x-examples": [],
"x-filename": "/work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/delete_api_shutdown.md",
"x-hints": ""
},
"get": {
"description": "\n\n<small>Introduced in: v3.7.12, v3.8.1, v3.9.0</small>\n\nThis call reports progress about a soft Coordinator shutdown (see\ndocumentation of `DELETE /_admin/shutdown?soft=true`).\nIn this case, the following types of operations are tracked:\n\n - AQL cursors (in particular streaming cursors)\n - Transactions (in particular stream transactions)\n - Pregel runs (conducted by this Coordinator)\n - Ongoing asynchronous requests (using the `x-arango-async: store` HTTP header\n - Finished asynchronous requests, whose result has not yet been\n collected\n - Queued low priority requests (most normal requests)\n - Ongoing low priority requests\n\nThis API is only available on Coordinators.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nThe response indicates the fact that a soft shutdown is ongoing and the\nnumber of active operations of the various types. Once all numbers have gone\nto 0, the flag `allClear` is set and the Coordinator shuts down automatically.\n\n- **lowPrioOngoingRequests**: Number of queued low priority requests.\n- **transactions**: Number of ongoing transactions.\n- **pendingJobs**: Number of ongoing asynchronous requests.\n- **pregelConductors**: Number of ongoing Pregel jobs.\n- **lowPrioQueuedRequests**: Number of ongoing low priority requests.\n- **AQLcursors**: Number of AQL cursors that are still active.\n- **softShutdownOngoing**: Whether a soft shutdown of the Coordinator is in progress.\n- **doneJobs**: Number of finished asynchronous requests, whose result has not yet been collected.\n- **allClear**: Whether all active operations finished.\n\n",
"operationId": "RestGetShutdownHandler",
"parameters": [],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "The response indicates the fact that a soft shutdown is ongoing and the\nnumber of active operations of the various types. Once all numbers have gone\nto 0, the flag `allClear` is set and the Coordinator shuts down automatically.\n\n",
"schema": {
"$ref": "#/definitions/get_api_shutdown_rc_200"
},
"x-description-offset": 747
}
},
"summary": "Query progress of soft shutdown process",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/get_api_shutdown.md",
"x-hints": ""
}
},
"/_admin/statistics": {
Expand Down
3 changes: 3 additions & 0 deletions 3.9/http/miscellaneous-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This is an overview of ArangoDB's HTTP interface for miscellaneous functions.
<!-- lib/Admin/RestShutdownHandler.cpp -->
{% docublock delete_api_shutdown %}

<!-- lib/Admin/RestShutdownHandler.cpp -->
{% docublock get_api_shutdown %}

<!-- js/actions/api-system.js -->
{% docublock post_admin_execute %}

Expand Down
0