Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

Today when a searchable snapshot is mounted it inherits many of the
settings of the original index, including any index-level allocation
filters that were in place when the snapshot was taken. These filters
typically make no sense on the mounted index, so users must explicitly
override or drop them.

With this commit at mount time we drop all index-level allocation
filters that existed on the original index, although we continue to
respect any allocation filters that were specified as part of the mount
request.

Closes #69759

Today when a searchable snapshot is mounted it inherits many of the
settings of the original index, including any index-level allocation
filters that were in place when the snapshot was taken. These filters
typically make no sense on the mounted index, so users must explicitly
override or drop them.

With this commit at mount time we drop all index-level allocation
filters that existed on the original index, although we continue to
respect any allocation filters that were specified as part of the mount
request.

Closes elastic#69759
@DaveCTurner DaveCTurner requested review from dakrone, tlrx and ywelsch March 5, 2021 10:39
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Mar 5, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

final RestoreSnapshotResponse restoreSnapshotResponse = client().execute(MountSearchableSnapshotAction.INSTANCE, mountRequest)
.actionGet();
assertThat(restoreSnapshotResponse.getRestoreInfo().failedShards(), equalTo(0));
ensureGreen(mountRequest.mountedIndexName());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to also check that the setting is not actually set (when it is different from mountSetting).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done in 1bcdbc2.

@DaveCTurner DaveCTurner merged commit 048b7d4 into elastic:master Mar 5, 2021
@DaveCTurner DaveCTurner deleted the 2021-03-05-searchable-snapshot-allocation-filtering branch March 5, 2021 13:34
DaveCTurner added a commit that referenced this pull request Mar 5, 2021
Today when a searchable snapshot is mounted it inherits many of the
settings of the original index, including any index-level allocation
filters that were in place when the snapshot was taken. These filters
typically make no sense on the mounted index, so users must explicitly
override or drop them.

With this commit at mount time we drop all index-level allocation
filters that existed on the original index, although we continue to
respect any allocation filters that were specified as part of the mount
request.

Closes #69759
DaveCTurner added a commit that referenced this pull request Mar 5, 2021
Today when a searchable snapshot is mounted it inherits many of the
settings of the original index, including any index-level allocation
filters that were in place when the snapshot was taken. These filters
typically make no sense on the mounted index, so users must explicitly
override or drop them.

With this commit at mount time we drop all index-level allocation
filters that existed on the original index, although we continue to
respect any allocation filters that were specified as part of the mount
request.

Closes #69759
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v7.12.1 v7.13.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mounting a searchable snapshot should clear all index-level allocation filtering

4 participants