-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Replicate or relocate data via snapshot #73496
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
This commit adds a new master transport action TransportGetShardSnapshotAction that allows getting the last successful snapshot for a particular shard in a set of repositories. It deals with the different implementation details around BwC for repositories. Relates #73496
This commit adds a new master transport action TransportGetShardSnapshotAction that allows getting the last successful snapshot for a particular shard in a set of repositories. It deals with the different implementation details around BwC for repositories. Relates elastic#73496 Backport of elastic#75080
…c#75080) This commit adds a new master transport action TransportGetShardSnapshotAction that allows getting the last successful snapshot for a particular shard in a set of repositories. It deals with the different implementation details around BwC for repositories. Relates elastic#73496
…#75840) This commit adds a new set of classes that would compute a peer recovery plan, based on source files + target files + available snapshots. When possible it would try to maximize the number of files used from a snapshot. It uses repositories with `use_for_peer_recovery` setting set to true. It adds a new recovery setting `indices.recovery.use_snapshots` Relates #73496
This commit adds a new set of classes that would compute a peer recovery plan, based on source files + target files + available snapshots. When possible it would try to maximize the number of files used from a snapshot. It uses repositories with `use_for_peer_recovery` setting set to true. It adds a new recovery setting `indices.recovery.use_snapshots` Relates elastic#73496 Backport of elastic#75840
…#76239) This commit adds a new set of classes that would compute a peer recovery plan, based on source files + target files + available snapshots. When possible it would try to maximize the number of files used from a snapshot. It uses repositories with `use_for_peer_recovery` setting set to true. It adds a new recovery setting `indices.recovery.use_snapshots` Relates #73496 Backport of #75840
Another scenario this can help with is scaling out search-heavy clusters. For instance if you have 5 nodes answering search requests for a hot index and they're close to be at capacity. Trying to increase the replicas often makes this worse because now the already busy nodes have to also replicate their shards to new nodes, which might make it take a long time or not be possible because they're oversaturated. Replicating the shards from snapshot storage would be able to handle this without involving the existing hot nodes. |
This commit adds peer recoveries from snapshots. It allows establishing a replica by downloading file data from a snapshot rather than transferring the data from the primary. Enabling this feature is done on the repository definition. Repositories having the setting `use_for_peer_recovery=true` will be consulted to find a good snapshot when recovering a shard. Relates #73496
This commit adds peer recoveries from snapshots. It allows establishing a replica by downloading file data from a snapshot rather than transferring the data from the primary. Enabling this feature is done on the repository definition. Repositories having the setting `use_for_peer_recovery=true` will be consulted to find a good snapshot when recovering a shard. Relates elastic#73496 Backport of elastic#76237
This commit adds third party integration tests for snapshot based recoveries in S3, Azure and GCS. Relates elastic#73496
This commit adds peer recoveries from snapshots. It allows establishing a replica by downloading file data from a snapshot rather than transferring the data from the primary. Enabling this feature is done on the repository definition. Repositories having the setting `use_for_peer_recovery=true` will be consulted to find a good snapshot when recovering a shard. Relates #73496 Backport of #76237
This commit adds third party integration tests for snapshot based recoveries in S3, Azure and GCS. Relates #73496
This commit adds third party integration tests for snapshot based recoveries in S3, Azure and GCS. Relates elastic#73496 Backport of elastic#76489
Adds new field to recovery API to keep track of amount of data recovered from snapshots. The normal recovered_bytes field remains and is also increased for recovery from snapshot but can go backwards in the unlikely case that recovery from snapshot fails to download a file. Relates #73496
…#76499) Adds new field to recovery API to keep track of amount of data recovered from snapshots. The normal recovered_bytes field remains and is also increased for recovery from snapshot but can go backwards in the unlikely case that recovery from snapshot fails to download a file. Relates elastic#73496
…#76572) * Keep track of data recovered from snapshots in RecoveryState (#76499) Adds new field to recovery API to keep track of amount of data recovered from snapshots. The normal recovered_bytes field remains and is also increased for recovery from snapshot but can go backwards in the unlikely case that recovery from snapshot fails to download a file. Relates #73496 * one less space Co-authored-by: Francisco Fernández Castaño <[email protected]>
This commit adds support for peer recoveries using snapshots after a primary failover if the snapshot shares the same logical contents but the phyisical files are different. It uses the seq no information stored in the snapshot to compare against the current shard source node seq nos and decide whether or not it can use the snapshot to recover the shard. Since the underlying index files are different to the source index files, error handling is different than when the files are shared. In this case, if there's an error while snapshots files are recovered, we have to cancel the on-going downloads, wait until all in-flight operations complete, remove the recovered files and start from scratch using a fallback recovery plan that uses the files from the source node. Relates elastic#73496
…rs (#77420) This commit adds support for peer recoveries using snapshots after a primary failover if the snapshot shares the same logical contents but the physical files are different. It uses the seq no information stored in the snapshot to compare against the current shard source node seq nos and decide whether or not it can use the snapshot to recover the shard. Since the underlying index files are different to the source index files, error handling is different than when the files are shared. In this case, if there's an error while snapshots files are recovered, we have to cancel the on-going downloads, wait until all in-flight operations complete, remove the recovered files and start from scratch using a fallback recovery plan that uses the files from the source node. Relates #73496
This commit adds support for peer recoveries using snapshots after a primary failover if the snapshot shares the same logical contents but the physical files are different. It uses the seq no information stored in the snapshot to compare against the current shard source node seq nos and decide whether or not it can use the snapshot to recover the shard. Since the underlying index files are different to the source index files, error handling is different than when the files are shared. In this case, if there's an error while snapshots files are recovered, we have to cancel the on-going downloads, wait until all in-flight operations complete, remove the recovered files and start from scratch using a fallback recovery plan that uses the files from the source node. Relates elastic#73496 Backport of elastic#77420
…ailovers (#79137) This commit adds support for peer recoveries using snapshots after a primary failover if the snapshot shares the same logical contents but the physical files are different. It uses the seq no information stored in the snapshot to compare against the current shard source node seq nos and decide whether or not it can use the snapshot to recover the shard. Since the underlying index files are different to the source index files, error handling is different than when the files are shared. In this case, if there's an error while snapshots files are recovered, we have to cancel the on-going downloads, wait until all in-flight operations complete, remove the recovered files and start from scratch using a fallback recovery plan that uses the files from the source node. Relates #73496 Backport of #77420
In order to reduce DTS costs for cross-zone data transfer, we should investigate whether we want to replicate or relocate data using a snapshot.
This is close to what a full_copy searchable snapshot index is. Rather than transferring data between ES nodes, we could use an object store as a "free" transferal medium.
Note that since this needs to go through an object store, the index would have to be marked as read-only to prevent data being lost.
There are two options for this, the first being using a regular snapshot and partially restoring it on the receiving node. The second is not using any snapshot infrastructure and instead using S3 as a "temporary staging" ground for relocating the index. Either option will require work, however, as we don't have a way of targeting the restoration of a single shard, and we will need to be able to treat the restoration similar to a regular relocation.
Fully cached searchable snapshot-backed indices do this already, where the recovery source for relocation becomes the snapshot rather than peer recovery, so this is a formalization of that process on a wider scale.
In order for this to be applicable automatically however, it would be useful to implement the concept of a default repository (#66040), so that a user does not need to specify a repository for their index.
If we implemented this using snapshots, we also need to decide whether the snapshot should be a one-off, where a snapshot is taken on-demand for the index, the relocation happens, then the snapshot is removed, or if we can implement it using existing periodic snapshots. We could also use the clone snapshot API to clone index-specific snapshots out of a particular SLM snapshot rather than creating a new one on-demand.
Phase 1
In this phase we will try to use the available snapshots for read-only and low write indices and thus reduce the inter AZ traffic when possible.
Phase 2
The text was updated successfully, but these errors were encountered: