Skip to content

Commit 9ffed9b

Browse files
committed
spotless
1 parent 8378949 commit 9ffed9b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

server/src/main/java/org/elasticsearch/repositories/FinalizeSnapshotContext.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.elasticsearch.snapshots.SnapshotInfo;
2020
import org.elasticsearch.snapshots.SnapshotsService;
2121

22-
import java.util.Collection;
2322
import java.util.Map;
2423
import java.util.Set;
2524

@@ -107,8 +106,6 @@ public ClusterState updatedClusterState(ClusterState state) {
107106
final ClusterState updatedState = SnapshotsService.stateWithoutSnapshot(state, snapshotInfo.snapshot(), updatedShardGenerations);
108107
// Now that the updated cluster state may have changed in-progress shard snapshots' shard generations to the latest shard
109108
// generation, let's mark any now unreferenced shard generations as obsolete and ready to be deleted.
110-
111-
final Collection<IndexId> deletedIndices = updatedShardGenerations.deletedIndices.indices();
112109
obsoleteGenerations.set(
113110
SnapshotsInProgress.get(updatedState).obsoleteGenerations(snapshotInfo.repository(), SnapshotsInProgress.get(state))
114111
);
@@ -127,7 +124,9 @@ public void onResponse(RepositoryData repositoryData) {
127124
/**
128125
* A record used to track the new shard generations that have been written for each shard in a snapshot.
129126
* An index may be deleted after the shard generation is written but before the snapshot is finalized.
130-
* In this case, its shard generation is tracked in {@link #deletedIndices} because it's still a valid shard generation blob that exists in the repository and may be used by subsequent snapshots, even though the index will not be included in the snapshot being finalized. Otherwise, it is tracked in
127+
* In this case, its shard generation is tracked in {@link #deletedIndices} because it's still a valid
128+
* shard generation blob that exists in the repository and may be used by subsequent snapshots, even though
129+
* the index will not be included in the snapshot being finalized. Otherwise, it is tracked in
131130
* {@link #liveIndices}.
132131
*/
133132
public record UpdatedShardGenerations(ShardGenerations liveIndices, ShardGenerations deletedIndices) {

server/src/main/java/org/elasticsearch/repositories/RepositoryData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public Map<IndexId, Collection<String>> indexMetaDataToRemoveAfterRemovingSnapsh
407407
* @param snapshotId Id of the new snapshot
408408
* @param details Details of the new snapshot
409409
* @param updatedShardGenerations Updated shard generations in the new snapshot, including both indices that are included
410-
* in the final snapshot and those got deleted while finalizing.
410+
* in the given snapshot and those got deleted while finalizing.
411411
* @param indexMetaBlobs Map of index metadata blob uuids
412412
* @param newIdentifiers Map of new index metadata blob uuids keyed by the identifiers of the
413413
* {@link IndexMetadata} in them

server/src/main/java/org/elasticsearch/repositories/ShardGenerations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import java.util.regex.Pattern;
2929
import java.util.stream.Collectors;
3030

31-
import static org.elasticsearch.repositories.FinalizeSnapshotContext.*;
31+
import static org.elasticsearch.repositories.FinalizeSnapshotContext.UpdatedShardGenerations;
3232

3333
/**
3434
* Represents the current {@link ShardGeneration} for each shard in a repository.

0 commit comments

Comments
 (0)