Skip to content

Commit

Permalink
Get Shard Generations from source metadata as well
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Bafna <[email protected]>
  • Loading branch information
gbbafna committed Oct 16, 2024
1 parent e77aefe commit f36691d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit f36691d

Please sign in to comment.