Skip to content

Commit 62d7b5e

Browse files
committed
[DOCS] Edit task manager summaries (#3343)
(cherry picked from commit 2426d4e)
1 parent 2f823ff commit 62d7b5e

File tree

7 files changed

+51
-25
lines changed

7 files changed

+51
-25
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/tasks/_types/TaskInfo.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,25 @@ export class TaskInfo {
3333
action: string
3434
cancelled?: boolean
3535
cancellable: boolean
36+
/**
37+
* Human readable text that identifies the particular request that the task is performing.
38+
* For example, it might identify the search request being performed by a search task.
39+
* Other kinds of tasks have different descriptions, like `_reindex` which has the source and the destination, or `_bulk` which just has the number of requests and the destination indices.
40+
* Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.
41+
*/
3642
description?: string
3743
headers: Dictionary<string, string>
3844
id: long
3945
node: NodeId
4046
running_time?: Duration
4147
running_time_in_nanos: DurationValue<UnitNanos>
4248
start_time_in_millis: EpochTime<UnitMillis>
43-
/** Task status information can vary wildly from task to task. */
49+
/**
50+
* The internal status of the task, which varies from task to task.
51+
* The format also varies.
52+
* While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes.
53+
* Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.
54+
*/
4455
status?: UserDefinedValue
4556
type: string
4657
parent_task_id?: TaskId

specification/tasks/cancel/CancelTasksRequest.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ import { RequestBase } from '@_types/Base'
2121
import { TaskId } from '@_types/common'
2222

2323
/**
24+
* Cancel a task.
25+
* A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away.
26+
* It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation.
27+
* The get task information API will continue to list these cancelled tasks until they complete.
28+
* The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.
29+
*
30+
* To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the `?detailed` parameter to identify the other tasks the system is running.
31+
* You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.
2432
* @rest_spec_name tasks.cancel
2533
* @availability stack since=2.3.0 stability=experimental
2634
* @availability serverless stability=experimental visibility=private

specification/tasks/get/GetTaskRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Duration } from '@_types/Time'
2323

2424
/**
2525
* Get task information.
26-
* Returns information about the tasks currently executing in the cluster.
26+
* Get information about a task currently running in the cluster.
2727
* @rest_spec_name tasks.get
2828
* @availability stack since=5.0.0 stability=experimental
2929
* @availability serverless stability=experimental visibility=public

specification/tasks/list/ListTasksRequest.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ import { Id, NodeIds } from '@_types/common'
2323
import { Duration } from '@_types/Time'
2424

2525
/**
26-
* The task management API returns information about tasks currently executing on one or more nodes in the cluster.
26+
* Get all tasks.
27+
* Get information about the tasks currently running on one or more nodes in the cluster.
2728
* @rest_spec_name tasks.list
2829
* @availability stack since=2.3.0 stability=experimental
2930
* @availability serverless stability=experimental visibility=private
30-
* @cluster_privileges monitor, manage
31+
* @cluster_privileges monitor
3132
* @doc_id tasks
3233
*/
3334
export interface Request extends RequestBase {
@@ -38,6 +39,7 @@ export interface Request extends RequestBase {
3839
actions?: string | string[]
3940
/**
4041
* If `true`, the response includes detailed information about shard recoveries.
42+
* This information is useful to distinguish tasks from each other but is more costly to run.
4143
* @server_default false
4244
*/
4345
detailed?: boolean

0 commit comments

Comments
 (0)