Skip to content

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

Merged
dakrone merged 5 commits intoelastic:7.xfrom
dakrone:backport/7.x/pr-68714
Feb 9, 2021
Merged

[7.x] Add support for partial searchable snapshots to ILM (#68714)#68762
dakrone merged 5 commits intoelastic:7.xfrom
dakrone:backport/7.x/pr-68714

Conversation

@dakrone
Copy link
Copy Markdown
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 DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. v7.12.0 labels Feb 9, 2021
@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Feb 9, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

@dakrone
Copy link
Copy Markdown
Member Author

dakrone commented Feb 9, 2021

@elasticmachine update branch

@dakrone
Copy link
Copy Markdown
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 DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v7.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants