Move async task maintenance service to core plugin#57700
Move async task maintenance service to core plugin#57700imotov merged 5 commits intoelastic:feature/async-eqlfrom
Conversation
The async task task maintenance service is used by both async search plugin as well as EQL plugin. So it needs to reside in the core. Relates to elastic#49638
|
Pinging @elastic/es-search (:Search/Search) |
|
Pinging @elastic/es-ql (:Query Languages/EQL) |
| components.add(getLicenseService()); | ||
| components.add(getLicenseState()); | ||
|
|
||
| if (DiscoveryNode.isDataNode(environment.settings())) { |
There was a problem hiding this comment.
This makes me wonder if we should make the index a system index first ? This way, we could start the maintenance service in the system index plugin. I don't think it will cause issue to move the index into a system index since we have all the protection in place with the async search user ?
There was a problem hiding this comment.
Do you want me to convert AsyncSearch plugin into SystemIndexPlugin or should I create a separate "Async" plugin for that?
There was a problem hiding this comment.
I think we can have a dedicated plugin since the goal is to start the service for all users of the index ?
costin
left a comment
There was a problem hiding this comment.
A PR that removes code while preserving functionality? 👍
|
I added registration of system index and I also tried to move move some pieces into async plugin but it causes quite a bit of dependencies issues. We can try to move things around, but it seems to be a bigger effort and I would prefer to merge this branch first, since its prolonged maintenance takes time and increases chances of missing changes while resolving conflicts. |
I think we can restrain the async plugin to declare the system index and to start the maintenance service. It shouldn't be more than that imo. This way we can avoid starting the service in XPackPlugin and the maintenance service code can stay in x-pack core. WDYT ? |
|
@elasticsearchmachine run elasticsearch-ci/2 |
The async task task maintenance service is used by both async search plugin
as well as EQL plugin. So it needs to reside in the core.
Relates to #49638