Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Edit task management summaries #3343

Merged
merged 1 commit into from
Dec 18, 2024
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
16 changes: 10 additions & 6 deletions output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion specification/tasks/_types/TaskInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,25 @@ export class TaskInfo {
action: string
cancelled?: boolean
cancellable: boolean
/**
* Human readable text that identifies the particular request that the task is performing.
* For example, it might identify the search request being performed by a search task.
* 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.
* 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.
*/
description?: string
headers: Dictionary<string, string>
id: long
node: NodeId
running_time?: Duration
running_time_in_nanos: DurationValue<UnitNanos>
start_time_in_millis: EpochTime<UnitMillis>
/** Task status information can vary wildly from task to task. */
/**
* The internal status of the task, which varies from task to task.
* The format also varies.
* 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.
* Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.
*/
status?: UserDefinedValue
type: string
parent_task_id?: TaskId
Expand Down
8 changes: 8 additions & 0 deletions specification/tasks/cancel/CancelTasksRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ import { RequestBase } from '@_types/Base'
import { TaskId } from '@_types/common'

/**
* Cancel a task.
* 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.
* It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation.
* The get task information API will continue to list these cancelled tasks until they complete.
* The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.
*
* 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.
* 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.
* @rest_spec_name tasks.cancel
* @availability stack since=2.3.0 stability=experimental
* @availability serverless stability=experimental visibility=private
Expand Down
2 changes: 1 addition & 1 deletion specification/tasks/get/GetTaskRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Duration } from '@_types/Time'

/**
* Get task information.
* Returns information about the tasks currently executing in the cluster.
* Get information about a task currently running in the cluster.
* @rest_spec_name tasks.get
* @availability stack since=5.0.0 stability=experimental
* @availability serverless stability=experimental visibility=public
Expand Down
6 changes: 4 additions & 2 deletions specification/tasks/list/ListTasksRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ import { Id, NodeIds } from '@_types/common'
import { Duration } from '@_types/Time'

/**
* The task management API returns information about tasks currently executing on one or more nodes in the cluster.
* Get all tasks.
* Get information about the tasks currently running on one or more nodes in the cluster.
* @rest_spec_name tasks.list
* @availability stack since=2.3.0 stability=experimental
* @availability serverless stability=experimental visibility=private
* @cluster_privileges monitor, manage
* @cluster_privileges monitor
* @doc_id tasks
*/
export interface Request extends RequestBase {
Expand All @@ -38,6 +39,7 @@ export interface Request extends RequestBase {
actions?: string | string[]
/**
* If `true`, the response includes detailed information about shard recoveries.
* This information is useful to distinguish tasks from each other but is more costly to run.
* @server_default false
*/
detailed?: boolean
Expand Down
Loading