Skip to content
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

[Snapshot V2] Use metadata from source snapshot while cloning snapshot V2 #16344

Merged
merged 3 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Get Shard Generations from source metadata as well
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
  • Loading branch information
gbbafna committed Oct 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit f36691de4fe83bc2e365c5fdbd47d7eca85fdf30
Original file line number Diff line number Diff line change
@@ -962,8 +962,6 @@ public void clusterStateProcessed(String source, ClusterState oldState, final Cl
final Executor executor = threadPool.executor(ThreadPool.Names.SNAPSHOT);

executor.execute(ActionRunnable.supply(snapshotInfoListener, () -> repository.getSnapshotInfo(sourceSnapshotId)));
final ShardGenerations shardGenerations = repositoryData.shardGenerations();

snapshotInfoListener.whenComplete(snapshotInfo -> {
final SnapshotInfo cloneSnapshotInfo = new SnapshotInfo(
snapshot.getSnapshotId(),
@@ -1000,6 +998,7 @@ public void clusterStateProcessed(String source, ClusterState oldState, final Cl
}
);
metadataListener.whenComplete(meta -> {
ShardGenerations shardGenerations = buildGenerations(newEntry, meta);
repository.finalizeSnapshot(
shardGenerations,
repositoryData.getGenId(),
Loading