-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Move persistent tasks to core #28455
Move persistent tasks to core #28455
Commits on Jan 31, 2018
-
Adds support for persistent actions
A persistent action is a transport-like action that is using the cluster state instead of transport to start tasks. This allows persistent tasks to survive restart of executing nodes. A persistent action can be implemented by extending TransportPersistentAction. TransportPersistentAction will start the task by using PersistentActionService, which controls persistent tasks lifecycle. See TestPersistentActionPlugin for an example implementing a persistent action. Original commit: elastic/x-pack@5e83f1b
Configuration menu - View commit details
-
Copy full SHA for f136bfa - Browse repository at this point
Copy the full SHA f136bfaView commit details -
Add a number of auxiliary methods to persistent tasks classes.
Original commit: elastic/x-pack@7f44b41
Configuration menu - View commit details
-
Copy full SHA for 777b21f - Browse repository at this point
Copy the full SHA 777b21fView commit details -
Add support for task status on persistent tasks
Similarly to task status on normal tasks it's now possible to update task status on the persistent tasks. This should allow updating the state of the running tasks (such as loading, started, etc) as well as store intermediate state or progress. Original commit: elastic/x-pack@048006b
Configuration menu - View commit details
-
Copy full SHA for ac67d02 - Browse repository at this point
Copy the full SHA ac67d02View commit details -
Fix check style error after upgrade
Original commit: elastic/x-pack@3bf4025
Configuration menu - View commit details
-
Copy full SHA for 32e4061 - Browse repository at this point
Copy the full SHA 32e4061View commit details -
Replace List with Map in PersistentTasksInProgress
Store currently running persistent tasks in a map instead of a list. Original commit: elastic/x-pack@f88c9ad
Configuration menu - View commit details
-
Copy full SHA for d340c19 - Browse repository at this point
Copy the full SHA d340c19View commit details -
Moved job lifecycle over to persistent tasks
Also replaced the DELETING status from JobState with a boolean flag on Job. The state of a job is now stored inside a persistent task in cluster state. Jobs that aren't running don't have a persistent task, so I moved that notion of being deleted to the job config itself. Original commit: elastic/x-pack@21cd19c
Configuration menu - View commit details
-
Copy full SHA for 243b7e4 - Browse repository at this point
Copy the full SHA 243b7e4View commit details -
Make persistent task persist full cluster restart
This commit moves persistent tasks from ClusterState.Custom to MetaData.Custom and adds ability for the task to remain in the metadata after completion.
Configuration menu - View commit details
-
Copy full SHA for 16e661c - Browse repository at this point
Copy the full SHA 16e661cView commit details -
In order to keep track of restarted tasks, `allocationIdOnLastStatusU…
…pdate` field was added to `PersistentTaskInProgress` class. This will allow persistent task implementors to detect whether the executor node has changed or has been unset since the last status update has occured.
Configuration menu - View commit details
-
Copy full SHA for 479429c - Browse repository at this point
Copy the full SHA 479429cView commit details -
Add persistent task assignment explanations.
This commit allows persistent actions to indicate why a task was or wasn't assigned to a certain node.
Configuration menu - View commit details
-
Copy full SHA for 5eeb480 - Browse repository at this point
Copy the full SHA 5eeb480View commit details -
Request and Status in Persistent Tasks should be serialized using the…
…ir writable names Refactors xcontent serialization of Request and Status to use their writable names instead of action name. That simplifies the parsing logic, allows reuse of the same status object for multiple actions and is consistent with how named objects in xcontent are used.
Configuration menu - View commit details
-
Copy full SHA for b33fc05 - Browse repository at this point
Copy the full SHA b33fc05View commit details -
Simplify names of PersistentTasks-related classes
PersistentTask -> NodePersistentTask PersistentTasksInProgress -> PersistentTasks PersistentTaskInProgress -> PersistentTask
Configuration menu - View commit details
-
Copy full SHA for 810d933 - Browse repository at this point
Copy the full SHA 810d933View commit details -
Make PersistentAction independent from TransportActions (elastic#742)
Removes the transport layer dependency from PersistentActions, makes PersistentActionRegistry immutable and rename actions into tasks in class and variable names.
Configuration menu - View commit details
-
Copy full SHA for 9bd2441 - Browse repository at this point
Copy the full SHA 9bd2441View commit details -
Persistent Tasks: remove task restart on failure (elastic#815)
If a persistent task throws an exception, the persistent tasks framework will no longer try to restart the task. This is a temporary measure to prevent threshing the cluster with endless restart attempt. We will revisit this in the future version to make the restart process more robust. Please note, however, that if node executing the task goes down, the task will still be restarted on another node.
Configuration menu - View commit details
-
Copy full SHA for 19f39fd - Browse repository at this point
Copy the full SHA 19f39fdView commit details -
Persistent Tasks: Merge NodePersistentTask and RunningPersistentTask (e…
…lastic#842) Refactors NodePersistentTask and RunningPersistentTask into a single AllocatedPersistentTask. Makes it possible to update Persistent Task Status via AllocatedPersistentTask.
Configuration menu - View commit details
-
Copy full SHA for 37fad04 - Browse repository at this point
Copy the full SHA 37fad04View commit details -
Persistent Tasks: Remove unused stopped and removeOnCompletion flags (e…
…lastic#853) The stopped and removeOnCompletion flags are not currently used, this commit removes them for now to simplify things.
Configuration menu - View commit details
-
Copy full SHA for b142d7e - Browse repository at this point
Copy the full SHA b142d7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78b844e - Browse repository at this point
Copy the full SHA 78b844eView commit details -
Persistent Tasks: Add waitForPersistentTaskStatus method (elastic#901)
This method allows to wait for tasks to change their status to match the supplied predicate.
Configuration menu - View commit details
-
Copy full SHA for 6ca0447 - Browse repository at this point
Copy the full SHA 6ca0447View commit details -
Persistent Tasks: require correct allocation id for status updates (e…
…lastic#923) In order to prevent tasks state updates by stale executors, this commit adds a check for correct allocation id during status update operation.
Configuration menu - View commit details
-
Copy full SHA for 1b0f5b9 - Browse repository at this point
Copy the full SHA 1b0f5b9View commit details -
Use PersistentTasksService#waitForPersistentTaskStatus(...) to wait f…
…or job and datafeed status and use PersistentTasksService#removeTask(...) to force close job and force stop datafeed.
Configuration menu - View commit details
-
Copy full SHA for a5acb55 - Browse repository at this point
Copy the full SHA a5acb55View commit details -
Persistent Tasks: check the current state in waitForPersistentTaskSta…
…tus (elastic#935) Add a check for the current state waitForPersistentTaskStatus before waiting for the next one. This fixes sporadic failure in testPersistentActionStatusUpdate test. Fixes elastic#928
Configuration menu - View commit details
-
Copy full SHA for 5b45b16 - Browse repository at this point
Copy the full SHA 5b45b16View commit details -
Respond to rename random ASCII helper methods
This commit is response to the renaming of the random ASCII helper methods in ESTestCase. The name of this method was changed because these methods only produce random strings generated from [a-zA-Z], not from all ASCII characters.
Configuration menu - View commit details
-
Copy full SHA for 97822db - Browse repository at this point
Copy the full SHA 97822dbView commit details -
Persistent Tasks: refactor PersistentTasksService to use ActionListen…
…er (elastic#937) PersistentTasksService methods are not using ActionListener<PersistentTask<?>> instead of PersistentTaskOperationListener.
Configuration menu - View commit details
-
Copy full SHA for 5a8512b - Browse repository at this point
Copy the full SHA 5a8512bView commit details -
Configuration menu - View commit details
-
Copy full SHA for fab0dc4 - Browse repository at this point
Copy the full SHA fab0dc4View commit details -
Persistent Tasks: remove retries on notification failures (elastic#977)
Retries should be already handled by TransportMasterNodeAction, there is no need to introduce another retry layer in Persistent Tasks code.
Configuration menu - View commit details
-
Copy full SHA for 95c6005 - Browse repository at this point
Copy the full SHA 95c6005View commit details -
Persistent Tasks: remove listener from PersistentTasksExecutor#nodeOp…
…eration (elastic#1032) Instead of having a separate listener for indicating that the current task is finished, this commit is switching to use allocated object itself.
Configuration menu - View commit details
-
Copy full SHA for 0a1abd4 - Browse repository at this point
Copy the full SHA 0a1abd4View commit details -
Added PersistentTasksService#waitForPersistentTasksStatus(...) method…
… to allow callers to wait when an executor node has updated its task status.
Configuration menu - View commit details
-
Copy full SHA for 0a1f255 - Browse repository at this point
Copy the full SHA 0a1f255View commit details -
Persistent Tasks: switch from long task ids to string task ids (elast…
…ic#1035) This commit switches from long persistent task ids to caller-supplied string persistent task ids.
Configuration menu - View commit details
-
Copy full SHA for 6bfea09 - Browse repository at this point
Copy the full SHA 6bfea09View commit details -
Persistent Tasks: PersistentTaskRequest -> PersistTaskParams (elastic…
…#1057) Removes the last pieces of ActionRequest from PersistentTaskRequest and renames it into PersistTaskParams, which is now just an interface that extends NamedWriteable and ToXContent.
Configuration menu - View commit details
-
Copy full SHA for abd9ae3 - Browse repository at this point
Copy the full SHA abd9ae3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4771965 - Browse repository at this point
Copy the full SHA 4771965View commit details -
Persistent Tasks: force writeable name of params and status to be the…
… same as their task (elastic#1072) Changes persistent task serialization and forces params and status to have the same writeable name as the task itself.
Configuration menu - View commit details
-
Copy full SHA for fc524bc - Browse repository at this point
Copy the full SHA fc524bcView commit details -
Fixes compile errors in Eclipse due to generics
PersistentTasksCustomMetadata was using a generic param named `Params`. This conflicted with the imported interface `ToXContent.Params`. The java compiler was preferring the generic param over the interface so everything was fine but Eclipse apparently prefers the interface int his case which was screwing up the Hierarchy and causing compile errors in Eclipse. This changes fixes it by renaming the Generic param to `P`
Configuration menu - View commit details
-
Copy full SHA for 76cd7b1 - Browse repository at this point
Copy the full SHA 76cd7b1View commit details -
Persistent tasks: require allocation id on task completion (elastic#1107
Configuration menu - View commit details
-
Copy full SHA for a08e2d9 - Browse repository at this point
Copy the full SHA a08e2d9View commit details -
Separate publishing from applying cluster states
Companion commit to elastic#24236
Configuration menu - View commit details
-
Copy full SHA for 44ea5d6 - Browse repository at this point
Copy the full SHA 44ea5d6View commit details -
Don't call ClusterService.state() in a ClusterStateUpdateTask
The current state is readily available as a parameter
Configuration menu - View commit details
-
Copy full SHA for e69317b - Browse repository at this point
Copy the full SHA e69317bView commit details -
Fix static / version based BWC tests (elastic#1456)
With the leniency in Version.java we missed to really setup BWC testing for static indices. This change brings back the testing and adds missing bwc indices. Relates to elastic#24732
Configuration menu - View commit details
-
Copy full SHA for 292e383 - Browse repository at this point
Copy the full SHA 292e383View commit details -
Configuration menu - View commit details
-
Copy full SHA for 614aef2 - Browse repository at this point
Copy the full SHA 614aef2View commit details -
Always Accumulate Transport Exceptions (elastic#1619)
This is the x-pack side of the removal of `accumulateExceptions()` for both `TransportNodesAction` and `TransportTasksAction`. There are occasional, random failures that occur during API calls that are silently ignored from the caller's perspective, which also leads to weird API responses that have no response and also no errors, which is obviously untrue.
Configuration menu - View commit details
-
Copy full SHA for 1cef531 - Browse repository at this point
Copy the full SHA 1cef531View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d50f9c - Browse repository at this point
Copy the full SHA 0d50f9cView commit details -
Persistent Tasks: remove unused isCurrentStatus method (elastic#2076)
Removes a method that is no longer used in production code. Relates to elastic#957
Configuration menu - View commit details
-
Copy full SHA for ffdb05e - Browse repository at this point
Copy the full SHA ffdb05eView commit details -
Move tribe to a module (elastic#2088)
Companion PR to elastic#25778
Configuration menu - View commit details
-
Copy full SHA for b5f2813 - Browse repository at this point
Copy the full SHA b5f2813View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65ce227 - Browse repository at this point
Copy the full SHA 65ce227View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0de3c3 - Browse repository at this point
Copy the full SHA b0de3c3View commit details -
Make AllocatedPersistentTask members volatile (elastic#2297)
These members are default initialized on contruction and then set by the init() method. It's possible that another thread accessing the object after init() is called could still see the null/0 values, depending on how the compiler optimizes the code.
Configuration menu - View commit details
-
Copy full SHA for 7313ad5 - Browse repository at this point
Copy the full SHA 7313ad5View commit details -
Refactor/to x content fragments2 (elastic#2329)
* Moves more classes over to ToXContentObject/Fragment * Removes ToXContentToBytes * Removes ToXContent from Enums * review comment fix * slight change to use XContantHelper
Configuration menu - View commit details
-
Copy full SHA for 1c489ee - Browse repository at this point
Copy the full SHA 1c489eeView commit details -
Make the persistent task status available to PersistentTasksExecutor.…
…nodeOperation(...) method
Configuration menu - View commit details
-
Copy full SHA for 4dd6995 - Browse repository at this point
Copy the full SHA 4dd6995View commit details -
Remove InternalClient and InternalSecurityClient (elastic#3054)
This change removes the InternalClient and the InternalSecurityClient. These are replaced with usage of the ThreadContext and a transient value, `action.origin`, to indicate which component the request came from. The security code has been updated to look for this value and ensure the request is executed as the proper user. This work comes from elastic#2808 where @s1monw suggested that we do this. While working on this, I came across index template registries and rather than updating them to use the new method, I replaced the ML one with the template upgrade framework so that we could remove this template registry. The watcher template registry is still needed as the template must be updated for rolling upgrades to work (see elastic#2950).
Configuration menu - View commit details
-
Copy full SHA for 8521b2d - Browse repository at this point
Copy the full SHA 8521b2dView commit details -
Add adding ability to associate an ID with tasks.
Persistent tasks portion of elastic#23250
Configuration menu - View commit details
-
Copy full SHA for 41071e4 - Browse repository at this point
Copy the full SHA 41071e4View commit details -
Added AllocatedPersistentTask#waitForPersistentTaskStatus(...) that d…
…elegates to PersistentTasksService#waitForPersistentTaskStatus(...) This allows persistent tasks executor implementations to not have an instance of PersistentTasksService.
Configuration menu - View commit details
-
Copy full SHA for cc16f9d - Browse repository at this point
Copy the full SHA cc16f9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07e727c - Browse repository at this point
Copy the full SHA 07e727cView commit details -
Made persistent tasks executors pluggable.
Configuration menu - View commit details
-
Copy full SHA for 592eedb - Browse repository at this point
Copy the full SHA 592eedbView commit details