Skip to content

[7.x] Prevent searchable snapshots indices to be shrunk/split#75289

Merged
elasticsearchmachine merged 1 commit intoelastic:7.xfrom
tlrx:forbid-resize-actions-for-ss-7.x
Jul 13, 2021
Merged

[7.x] Prevent searchable snapshots indices to be shrunk/split#75289
elasticsearchmachine merged 1 commit intoelastic:7.xfrom
tlrx:forbid-resize-actions-for-ss-7.x

Conversation

@tlrx
Copy link
Copy Markdown
Member

@tlrx tlrx commented Jul 13, 2021

Today if we try to shrink or to split a searchable snapshot
index using the Resize API a new index will be created
but can't be assigned, and even if it was assigned it won't
work as the number of shards can't be changed and must
always match the number of shards from the snapshot.

This commit adds some verification to prevent a snapshot
backed indices to be resized and if an attempt is made,
throw a better error message.

Note that cloning is supported since #56595 and in this
change we make sure that it is only used to convert the
searchable snapshot index back to a regular index.

Relates #74977 (comment)
Backport of #75227

Today if we try to shrink or to split a searchable snapshot
index using the Resize API a new index will be created
but can't be assigned, and even if it was assigned it won't
work as the number of shards can't be changed and must
always match the number of shards from the snapshot.

This commit adds some verification to prevent a snapshot
backed indices to be resized and if an attempt is made,
throw a better error message.

Note that cloning is supported since elastic#56595 and in this
change we make sure that it is only used to convert the
searchable snapshot index back to a regular index.

Relates elastic#74977 (comment)
@tlrx tlrx added >enhancement :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v7.15.0 labels Jul 13, 2021
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team. label Jul 13, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine elasticsearchmachine merged commit ec7f27e into elastic:7.x Jul 13, 2021
@tlrx tlrx deleted the forbid-resize-actions-for-ss-7.x branch July 13, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement Team:Distributed Meta label for distributed team. v7.15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants