@@ -159,6 +159,7 @@ protected void clusterManagerOperation(
159
159
request .repository (),
160
160
Arrays .asList (request .snapshots ())
161
161
);
162
+
162
163
if (currentSnapshots .isEmpty ()) {
163
164
buildResponse (snapshotsInProgress , request , currentSnapshots , null , listener );
164
165
return ;
@@ -212,7 +213,10 @@ private Set<String> getNodeIdsOfCurrentSnapshots(final SnapshotsStatusRequest re
212
213
int totalShardsAcrossCurrentSnapshots = 0 ;
213
214
214
215
for (SnapshotsInProgress .Entry currentSnapshotEntry : currentSnapshots ) {
215
-
216
+ if (currentSnapshotEntry .remoteStoreIndexShallowCopyV2 ()) {
217
+ // skip current shallow v2 snapshots
218
+ continue ;
219
+ }
216
220
if (requestUsesIndexFilter ) {
217
221
// index-filter is allowed only for a single snapshot, which has to be this one
218
222
// first check if any requested indices are missing from this current snapshot
@@ -236,7 +240,7 @@ private Set<String> getNodeIdsOfCurrentSnapshots(final SnapshotsStatusRequest re
236
240
);
237
241
}
238
242
// the actual no. of shards contributed by this current snapshot will now be calculated
239
- } else if ( currentSnapshotEntry . remoteStoreIndexShallowCopyV2 () == false ) {
243
+ } else {
240
244
// all shards of this current snapshot are required in response
241
245
totalShardsAcrossCurrentSnapshots += currentSnapshotEntry .shards ().size ();
242
246
}
@@ -246,7 +250,7 @@ private Set<String> getNodeIdsOfCurrentSnapshots(final SnapshotsStatusRequest re
246
250
SnapshotsInProgress .ShardSnapshotStatus shardStatus = shardStatusEntry .getValue ();
247
251
boolean indexPresentInFilter = requestedIndexNames .contains (shardStatusEntry .getKey ().getIndexName ());
248
252
249
- if (requestUsesIndexFilter && indexPresentInFilter && currentSnapshotEntry . remoteStoreIndexShallowCopyV2 () == false ) {
253
+ if (requestUsesIndexFilter && indexPresentInFilter ) {
250
254
// count only those shards whose index belongs to the index-filter
251
255
totalShardsAcrossCurrentSnapshots ++;
252
256
0 commit comments