Skip to content

Task.getStatus() and AllocatedPersistentTask.getStatus() can be confusing #29608

@tlrx

Description

@tlrx

The Task.Status returned by the Task.getStatus() method is overridden and used by persistent tasks to keep their internal state (usually composed of one or more counters for task's progression and a task's specific state). This usage differs from the original purpose of Task.getStatus() which is to provide a quick update of the status of potentially very volatile tasks. The persistent task internal state is also shown in the Task API but I think it should only report progression/stats about the tasks here, while the Cluster State API shows the internal state of persistent tasks as it does today.

We could decorelate AllocatedPersistentTask.getStatus() from Task.Status by introducing a new PersistentTask.State interface and rename AllocatedPersistentTask.getStatus() to something like lastCommitedState().

@martijnvg @bleskes @imotov @polyfractal I'd be happy to have your opinion

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions