Skip to content

Commit 4974603

Browse files
committed
Merge branch '6.x' into ccr-6.x
* 6.x: Trim down usages of `ShardOperationFailedException` interface (#28312) Clean up commits when global checkpoint advanced (#28140) Do not return all indices if a specific alias is requested via get aliases api. CountedBitSet doesn't need to extend BitSet. (#28239) Calculate sum in Kahan summation algorithm in aggregations (#27807) (#27848)
2 parents 88a320f + 1dc8cb0 commit 4974603

File tree

68 files changed

+788
-213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+788
-213
lines changed

server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/TransportGetAliasesAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ protected GetAliasesResponse newResponse() {
6262
@Override
6363
protected void masterOperation(GetAliasesRequest request, ClusterState state, ActionListener<GetAliasesResponse> listener) {
6464
String[] concreteIndices = indexNameExpressionResolver.concreteIndexNames(state, request);
65-
@SuppressWarnings("unchecked")
66-
ImmutableOpenMap<String, List<AliasMetaData>> result = (ImmutableOpenMap) state.metaData().findAliases(request.aliases(), concreteIndices);
65+
ImmutableOpenMap<String, List<AliasMetaData>> result = state.metaData().findAliases(request.aliases(), concreteIndices);
6766
listener.onResponse(new GetAliasesResponse(result));
6867
}
6968

server/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.elasticsearch.action.admin.indices.cache.clear;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
22+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2323
import org.elasticsearch.action.support.broadcast.BroadcastResponse;
2424
import org.elasticsearch.common.io.stream.StreamInput;
2525
import org.elasticsearch.common.io.stream.StreamOutput;
@@ -38,7 +38,8 @@ public class ClearIndicesCacheResponse extends BroadcastResponse {
3838

3939
}
4040

41-
ClearIndicesCacheResponse(int totalShards, int successfulShards, int failedShards, List<ShardOperationFailedException> shardFailures) {
41+
ClearIndicesCacheResponse(int totalShards, int successfulShards, int failedShards,
42+
List<DefaultShardOperationFailedException> shardFailures) {
4243
super(totalShards, successfulShards, failedShards, shardFailures);
4344
}
4445

server/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
package org.elasticsearch.action.admin.indices.cache.clear;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
2322
import org.elasticsearch.action.support.ActionFilters;
23+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2424
import org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction;
2525
import org.elasticsearch.cluster.ClusterState;
2626
import org.elasticsearch.cluster.block.ClusterBlockException;
@@ -65,7 +65,7 @@ protected EmptyResult readShardResult(StreamInput in) throws IOException {
6565
@Override
6666
protected ClearIndicesCacheResponse newResponse(ClearIndicesCacheRequest request, int totalShards, int successfulShards,
6767
int failedShards, List<EmptyResult> responses,
68-
List<ShardOperationFailedException> shardFailures, ClusterState clusterState) {
68+
List<DefaultShardOperationFailedException> shardFailures, ClusterState clusterState) {
6969
return new ClearIndicesCacheResponse(totalShards, successfulShards, failedShards, shardFailures);
7070
}
7171

server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.elasticsearch.action.admin.indices.flush;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
22+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2323
import org.elasticsearch.action.support.broadcast.BroadcastResponse;
2424

2525
import java.util.List;
@@ -35,7 +35,7 @@ public class FlushResponse extends BroadcastResponse {
3535

3636
}
3737

38-
FlushResponse(int totalShards, int successfulShards, int failedShards, List<ShardOperationFailedException> shardFailures) {
38+
FlushResponse(int totalShards, int successfulShards, int failedShards, List<DefaultShardOperationFailedException> shardFailures) {
3939
super(totalShards, successfulShards, failedShards, shardFailures);
4040
}
4141

server/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
package org.elasticsearch.action.admin.indices.flush;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
2322
import org.elasticsearch.action.support.ActionFilters;
23+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2424
import org.elasticsearch.action.support.replication.ReplicationResponse;
2525
import org.elasticsearch.action.support.replication.TransportBroadcastReplicationAction;
2626
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
@@ -57,7 +57,8 @@ protected ShardFlushRequest newShardRequest(FlushRequest request, ShardId shardI
5757
}
5858

5959
@Override
60-
protected FlushResponse newResponse(int successfulShards, int failedShards, int totalNumCopies, List<ShardOperationFailedException> shardFailures) {
60+
protected FlushResponse newResponse(int successfulShards, int failedShards, int totalNumCopies, List
61+
<DefaultShardOperationFailedException> shardFailures) {
6162
return new FlushResponse(totalNumCopies, successfulShards, failedShards, shardFailures);
6263
}
6364
}

server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.elasticsearch.action.admin.indices.forcemerge;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
22+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2323
import org.elasticsearch.action.support.broadcast.BroadcastResponse;
2424

2525
import java.util.List;
@@ -32,7 +32,7 @@ public class ForceMergeResponse extends BroadcastResponse {
3232
ForceMergeResponse() {
3333
}
3434

35-
ForceMergeResponse(int totalShards, int successfulShards, int failedShards, List<ShardOperationFailedException> shardFailures) {
35+
ForceMergeResponse(int totalShards, int successfulShards, int failedShards, List<DefaultShardOperationFailedException> shardFailures) {
3636
super(totalShards, successfulShards, failedShards, shardFailures);
3737
}
3838
}

server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/TransportForceMergeAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
package org.elasticsearch.action.admin.indices.forcemerge;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
2322
import org.elasticsearch.action.support.ActionFilters;
23+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2424
import org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction;
2525
import org.elasticsearch.cluster.ClusterState;
2626
import org.elasticsearch.cluster.block.ClusterBlockException;
@@ -62,7 +62,7 @@ protected EmptyResult readShardResult(StreamInput in) throws IOException {
6262
}
6363

6464
@Override
65-
protected ForceMergeResponse newResponse(ForceMergeRequest request, int totalShards, int successfulShards, int failedShards, List<EmptyResult> responses, List<ShardOperationFailedException> shardFailures, ClusterState clusterState) {
65+
protected ForceMergeResponse newResponse(ForceMergeRequest request, int totalShards, int successfulShards, int failedShards, List<EmptyResult> responses, List<DefaultShardOperationFailedException> shardFailures, ClusterState clusterState) {
6666
return new ForceMergeResponse(totalShards, successfulShards, failedShards, shardFailures);
6767
}
6868

server/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryResponse.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.elasticsearch.action.admin.indices.recovery;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
22+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2323
import org.elasticsearch.action.support.broadcast.BroadcastResponse;
2424
import org.elasticsearch.common.Strings;
2525
import org.elasticsearch.common.io.stream.StreamInput;
@@ -56,7 +56,8 @@ public RecoveryResponse() { }
5656
* @param shardFailures List of failures processing shards
5757
*/
5858
public RecoveryResponse(int totalShards, int successfulShards, int failedShards, boolean detailed,
59-
Map<String, List<RecoveryState>> shardRecoveryStates, List<ShardOperationFailedException> shardFailures) {
59+
Map<String, List<RecoveryState>> shardRecoveryStates,
60+
List<DefaultShardOperationFailedException> shardFailures) {
6061
super(totalShards, successfulShards, failedShards, shardFailures);
6162
this.shardRecoveryStates = shardRecoveryStates;
6263
this.detailed = detailed;

server/src/main/java/org/elasticsearch/action/admin/indices/recovery/TransportRecoveryAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
package org.elasticsearch.action.admin.indices.recovery;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
2322
import org.elasticsearch.action.support.ActionFilters;
23+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2424
import org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction;
2525
import org.elasticsearch.cluster.ClusterState;
2626
import org.elasticsearch.cluster.block.ClusterBlockException;
@@ -69,7 +69,7 @@ protected RecoveryState readShardResult(StreamInput in) throws IOException {
6969

7070

7171
@Override
72-
protected RecoveryResponse newResponse(RecoveryRequest request, int totalShards, int successfulShards, int failedShards, List<RecoveryState> responses, List<ShardOperationFailedException> shardFailures, ClusterState clusterState) {
72+
protected RecoveryResponse newResponse(RecoveryRequest request, int totalShards, int successfulShards, int failedShards, List<RecoveryState> responses, List<DefaultShardOperationFailedException> shardFailures, ClusterState clusterState) {
7373
Map<String, List<RecoveryState>> shardResponses = new HashMap<>();
7474
for (RecoveryState recoveryState : responses) {
7575
if (recoveryState == null) {

server/src/main/java/org/elasticsearch/action/admin/indices/refresh/RefreshResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package org.elasticsearch.action.admin.indices.refresh;
2121

22-
import org.elasticsearch.action.ShardOperationFailedException;
22+
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
2323
import org.elasticsearch.action.support.broadcast.BroadcastResponse;
2424

2525
import java.util.List;
@@ -32,7 +32,7 @@ public class RefreshResponse extends BroadcastResponse {
3232
RefreshResponse() {
3333
}
3434

35-
RefreshResponse(int totalShards, int successfulShards, int failedShards, List<ShardOperationFailedException> shardFailures) {
35+
RefreshResponse(int totalShards, int successfulShards, int failedShards, List<DefaultShardOperationFailedException> shardFailures) {
3636
super(totalShards, successfulShards, failedShards, shardFailures);
3737
}
3838
}

0 commit comments

Comments
 (0)