Skip to content

Migrate watcher to system indices infrastructure (#67588)#69328

Merged
pugnascotia merged 3 commits intoelastic:7.xfrom
pugnascotia:61656-auto-create-watcher-7x
Feb 23, 2021
Merged

Migrate watcher to system indices infrastructure (#67588)#69328
pugnascotia merged 3 commits intoelastic:7.xfrom
pugnascotia:61656-auto-create-watcher-7x

Conversation

@pugnascotia
Copy link
Copy Markdown
Contributor

Backport of #67588. Part of #61656.

Migrate the .watches and .triggered_watches system indices to use
the auto-create infrastructure. The watcher history indices are left
alone.

As part of this work, a SystemIndexDescriptor now inspects its
mappings to determine whether it has any dynamic mappings. This
influences how strict Elasticsearch is with enforcing the descriptor's
mappings, since ES cannot know in advanced what all the mappings will
be.

This PR also fixes the SystemIndexManager so that (1) it doesn't fall
over when attempting to inspect the state of an index that hasn't been
created yet, and (2) does update mappings if there's no version field in
the mapping metadata.

Part of elastic#61656.

Migrate the `.watches` and `.triggered_watches` system indices to use
the auto-create infrastructure. The watcher history indices are left
alone.

As part of this work, a `SystemIndexDescriptor` now inspects its
mappings to determine whether it has any dynamic mappings. This
influences how strict Elasticsearch is with enforcing the descriptor's
mappings, since ES cannot know in advanced what all the mappings will
be.

This PR also fixes the `SystemIndexManager` so that (1) it doesn't fall
over when attempting to inspect the state of an index that hasn't been
created yet, and (2) does update mappings if there's no version field in
the mapping metadata.
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

@pugnascotia pugnascotia merged commit b9f0814 into elastic:7.x Feb 23, 2021
@pugnascotia pugnascotia deleted the 61656-auto-create-watcher-7x branch February 23, 2021 11:41
masseyke added a commit that referenced this pull request Jan 13, 2022
)

This commit prevents watcher from failing to start if its templates are unavailable. Previously the watcher service
would fail to start if (for example) the .watch-history-14 template did not exist. This could happen during a rolling
upgrade. In that case, the watcher service would fail to start even though it could reasonably keep writing without its
templates.
Relates #69328 #82109
masseyke added a commit to masseyke/elasticsearch that referenced this pull request Jan 13, 2022
…stic#82395)

This commit prevents watcher from failing to start if its templates are unavailable. Previously the watcher service
would fail to start if (for example) the .watch-history-14 template did not exist. This could happen during a rolling
upgrade. In that case, the watcher service would fail to start even though it could reasonably keep writing without its
templates.
Relates elastic#69328 elastic#82109
masseyke added a commit to masseyke/elasticsearch that referenced this pull request Jan 13, 2022
…stic#82395)

This commit prevents watcher from failing to start if its templates are unavailable. Previously the watcher service
would fail to start if (for example) the .watch-history-14 template did not exist. This could happen during a rolling
upgrade. In that case, the watcher service would fail to start even though it could reasonably keep writing without its
templates.
Relates elastic#69328 elastic#82109
elasticsearchmachine pushed a commit that referenced this pull request Jan 13, 2022
) (#82573)

This commit prevents watcher from failing to start if its templates are unavailable. Previously the watcher service
would fail to start if (for example) the .watch-history-14 template did not exist. This could happen during a rolling
upgrade. In that case, the watcher service would fail to start even though it could reasonably keep writing without its
templates.
Relates #69328 #82109
elasticsearchmachine pushed a commit that referenced this pull request Jan 13, 2022
) (#82572)

This commit prevents watcher from failing to start if its templates are unavailable. Previously the watcher service
would fail to start if (for example) the .watch-history-14 template did not exist. This could happen during a rolling
upgrade. In that case, the watcher service would fail to start even though it could reasonably keep writing without its
templates.
Relates #69328 #82109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants