-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add searchable snapshots index template for snapshot cache indices #59701
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
Conversation
|
Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore) |
|
@tlrx should this be using the legacy templates, given that they will be deprecated for 8.0? Since this is a new thing, I think it'd make more sense to start off using composable index templates so that it doesn't have to be updated at a later time |
|
@dakrone Thanks for spotting this. I missed the information that composable index templates will replace index templates. I'm going to update the code here to avoid using legacy templates. |
dakrone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I left three really minor things, thanks Tanguy!
x-pack/plugin/core/src/main/resources/searchable-snapshots-template.json
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/resources/searchable-snapshots-template.json
Show resolved
Hide resolved
| "aliases": { | ||
| ".snapshots": {} | ||
| }, | ||
| "settings": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should .snapshots indices also have index.hidden: true set in their settings? (I can't remember right now whether dot-prefixed indices automatically are hidden)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one request regarding naming; otherwise this is all quite unfamiliar territory to me but looks reasonable.
| // version 1: initial | ||
| static final int INDEX_TEMPLATE_VERSION = 1; | ||
|
|
||
| static final String SNAPSHOTS_CACHE_TEMPLATE_NAME = ".snapshots"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we call this something more specific, e.g. .snapshot-blob-cache? I worry that we might want to introduce other snapshot-related system indices in future, so the choice of a generic name now will result in confusion and/or a painful migration later.
|
We decided to use a dedicated system index, implemented in #60522. I'm closing this issue. Thanks for the feedback, and sorry for the noise 🙏 |
This pull request adds the basic infrastructure that creates an index template for the future
.snapshots-Nsystem indices. Those indices will contain documents about blobs stored in remote snapshot repositories.This change will go in master first and will be backported along with future changes once the feature is stable enough.