Skip to content

[7.x] Add support for partial searchable snapshots to ILM (#68714) #68762

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

Merged
merged 5 commits into from
Feb 9, 2021

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Feb 9, 2021

Backports the following commits to 7.x:

This commit adds support for the recently introduced partial searchable snapshot (elastic#68509) to ILM.

Searchable snapshot ILM actions may now be specified with a `storage` option, specifying either
`full_copy` or `shared_cache` (similar to the "mount" API) to mount either a full or partial
searchable snapshot:

```json
PUT _ilm/policy/my_policy
{
  "policy": {
    "phases": {
      "cold": {
        "actions": {
          "searchable_snapshot" : {
            "snapshot_repository" : "backing_repo",
            "storage": "shared_cache"
          }
        }
      }
    }
  }
}
```

Internally, If more than one searchable snapshot action is specified (for example, a full searchable
snapshot in the "cold" phase and a partial searchable snapshot in the "frozen" phase) ILM will
re-use the existing snapshot when doing the second mount since a second snapshot is not required.

Currently this is allowed for actions that use the same repository, however, multiple
`searchable_snapshot` actions for the same index that use different repositories is not allowed (the
ERROR state is entered). We plan to allow this in the future in subsequent work.

If the `storage` option is not specified in the `searchable_snapshot` action, the mount type
defaults to "shared_cache" in the frozen phase and "full_copy" in all other phases.

Relates to elastic#68605
@dakrone dakrone added backport :Data Management/ILM+SLM Index and Snapshot lifecycle management v7.12.0 labels Feb 9, 2021
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Feb 9, 2021
@elasticmachine
Copy link
Collaborator

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

@dakrone
Copy link
Member Author

dakrone commented Feb 9, 2021

@elasticmachine update branch

@dakrone
Copy link
Member Author

dakrone commented Feb 9, 2021

@elasticmachine run elasticsearch-ci/bwc

(failure related to 68757)

@dakrone dakrone merged commit e9bef38 into elastic:7.x Feb 9, 2021
@dakrone dakrone deleted the backport/7.x/pr-68714 branch February 9, 2021 20:19
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Feb 9, 2021
dakrone added a commit that referenced this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants