Skip to content

Commit

Permalink
Change default value of MAX_SHARDS_ALLOWED_IN_STATUS_API
Browse files Browse the repository at this point in the history
Signed-off-by: Lakshya Taragi <[email protected]>
  • Loading branch information
ltaragi committed Sep 2, 2024
1 parent 496095a commit cd03680
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
import org.opensearch.common.util.io.IOUtils;
import org.opensearch.core.common.Strings;
import org.opensearch.core.common.unit.ByteSizeUnit;
import org.opensearch.repositories.IndexId;
import org.opensearch.core.rest.RestStatus;
import org.opensearch.index.IndexNotFoundException;
import org.opensearch.repositories.IndexId;
import org.opensearch.repositories.blobstore.BlobStoreRepository;
import org.opensearch.threadpool.ThreadPool;

Expand All @@ -70,8 +70,8 @@
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import static org.opensearch.test.OpenSearchIntegTestCase.resolvePath;
import static org.opensearch.snapshots.SnapshotsService.MAX_SHARDS_ALLOWED_IN_STATUS_API;
import static org.opensearch.test.OpenSearchIntegTestCase.resolvePath;
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,13 @@ public class SnapshotsService extends AbstractLifecycleComponent implements Clus
Setting.Property.Dynamic
);

// TODO: discuss values and name to be used here
/**
* Setting to specify the maximum number of shards that can be included in the result for the snapshot status
* API call. Note that it does not apply to V2-shallow snapshots.
*/
public static final Setting<Integer> MAX_SHARDS_ALLOWED_IN_STATUS_API = Setting.intSetting(
"snapshot.max_shards_allowed_in_status_api",
1000,
200000,
1,
Setting.Property.NodeScope,
Setting.Property.Dynamic
Expand Down

0 comments on commit cd03680

Please sign in to comment.