@@ -267,14 +267,14 @@ public void restoreSnapshot(
267
267
* @param projectId project for the restore
268
268
* @param request restore request
269
269
* @param listener restore listener
270
- * @param updater handler that allows callers to make modifications to {@link Metadata }
270
+ * @param updater handler that allows callers to make modifications to {@link ProjectMetadata }
271
271
* in the same cluster state update as the restore operation
272
272
*/
273
273
public void restoreSnapshot (
274
274
final ProjectId projectId ,
275
275
final RestoreSnapshotRequest request ,
276
276
final ActionListener <RestoreCompletionResponse > listener ,
277
- final BiConsumer <ClusterState , Metadata .Builder > updater
277
+ final BiConsumer <ClusterState , ProjectMetadata .Builder > updater
278
278
) {
279
279
assert Repository .assertSnapshotMetaThread ();
280
280
@@ -368,8 +368,8 @@ public void restoreSnapshot(
368
368
* @param repository the repository to restore from
369
369
* @param request restore request
370
370
* @param repositoryData current repository data for the repository to restore from
371
- * @param updater handler that allows callers to make modifications to {@link Metadata } in the same cluster state update as the
372
- * restore operation
371
+ * @param updater handler that allows callers to make modifications to {@link ProjectMetadata } in the same cluster state update
372
+ * as the restore operation
373
373
* @param listener listener to resolve once restore has been started
374
374
* @throws IOException on failure to load metadata from the repository
375
375
*/
@@ -378,7 +378,7 @@ private void startRestore(
378
378
Repository repository ,
379
379
RestoreSnapshotRequest request ,
380
380
RepositoryData repositoryData ,
381
- BiConsumer <ClusterState , Metadata .Builder > updater ,
381
+ BiConsumer <ClusterState , ProjectMetadata .Builder > updater ,
382
382
ActionListener <RestoreCompletionResponse > listener
383
383
) throws IOException {
384
384
assert Repository .assertSnapshotMetaThread ();
@@ -1371,7 +1371,7 @@ private final class RestoreSnapshotStateTask extends ClusterStateUpdateTask {
1371
1371
1372
1372
private final Collection <DataStream > dataStreamsToRestore ;
1373
1373
1374
- private final BiConsumer <ClusterState , Metadata .Builder > updater ;
1374
+ private final BiConsumer <ClusterState , ProjectMetadata .Builder > updater ;
1375
1375
1376
1376
private final AllocationActionListener <RestoreCompletionResponse > listener ;
1377
1377
private final Settings settings ;
@@ -1387,7 +1387,7 @@ private final class RestoreSnapshotStateTask extends ClusterStateUpdateTask {
1387
1387
SnapshotInfo snapshotInfo ,
1388
1388
Metadata metadata ,
1389
1389
Collection <DataStream > dataStreamsToRestore ,
1390
- BiConsumer <ClusterState , Metadata .Builder > updater ,
1390
+ BiConsumer <ClusterState , ProjectMetadata .Builder > updater ,
1391
1391
Settings settings ,
1392
1392
ActionListener <RestoreCompletionResponse > listener
1393
1393
) {
@@ -1586,7 +1586,7 @@ && isSystemIndex(snapshotIndexMetadata) == false) {
1586
1586
);
1587
1587
}
1588
1588
1589
- updater .accept (currentState , mdBuilder );
1589
+ updater .accept (currentState , mdBuilder . getProject ( projectId ) );
1590
1590
final ClusterState updatedClusterState = builder .metadata (mdBuilder )
1591
1591
.blocks (blocks )
1592
1592
.putRoutingTable (projectId , rtBuilder .build ())
0 commit comments