Skip to content

Commit e2910da

Browse files
authored
CLOUDP-336891: Add warnings about rolling index (#4367)
1 parent 8daf28e commit e2910da

File tree

6 files changed

+32
-2
lines changed

6 files changed

+32
-2
lines changed

docs/command/atlas-api-rollingIndex-createRollingIndex.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Admin API capabilities have their own release lifecycle, which you can check via
1919

2020
Creating the index in this way allows index builds on one replica set member as a standalone at a time, starting with the secondary members. Creating indexes in this way requires at least one replica set election. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.
2121

22+
23+
Warning: Building an index in a rolling fashion reduces the resiliency of your cluster and increases index build times. We only recommend using rolling index builds when regular index builds do not meet your needs.
24+
2225
This command is autogenerated and corresponds 1:1 with the Atlas API endpoint https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-creategroupclusterindexrollingindex.
2326

2427
For more information and examples, see the referenced API documentation linked above.

docs/command/atlas-clusters-indexes-create.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ atlas clusters indexes create
1414

1515
Create a rolling index for the specified cluster for your project.
1616

17+
Warning: Building an index in a rolling fashion reduces the resiliency of your cluster and increases index build times. We only recommend using rolling index builds when regular index builds do not meet your needs.
18+
1719
To use this command, you must authenticate with a user account, a service account, or an API key with the Project Data Access Admin role.
1820

1921
Syntax

internal/api/commands.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/cli/clusters/indexes/create.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ func CreateBuilder() *cobra.Command {
150150
cmd := &cobra.Command{
151151
Use: "create [indexName]",
152152
Short: "Create a rolling index for the specified cluster for your project.",
153-
Long: fmt.Sprintf(usage.RequiredRole, "Project Data Access Admin"),
154-
Args: require.MaximumNArgs(1),
153+
Long: `Warning: Building an index in a rolling fashion reduces the resiliency of your cluster and increases index build times. We only recommend using rolling index builds when regular index builds do not meet your needs.
154+
155+
` + fmt.Sprintf(usage.RequiredRole, "Project Data Access Admin"),
156+
Args: require.MaximumNArgs(1),
155157
Annotations: map[string]string{
156158
"indexNameDesc": "Name of the index.",
157159
},
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Add warning message to rolling index builds
4+
version: 1.0.0
5+
actions:
6+
- target: $.paths['/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/index'].post
7+
update:
8+
x-xgen-atlascli:
9+
override:
10+
description: |
11+
Creates an index on the cluster identified by its name in a rolling manner. Creating the index in this way allows index builds on one replica set member as a standalone at a time, starting with the secondary members. Creating indexes in this way requires at least one replica set election. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.
12+
13+
Warning: Building an index in a rolling fashion reduces the resiliency of your cluster and increases index build times. We only recommend using rolling index builds when regular index builds do not meet your needs.
14+

tools/internal/specs/spec-with-overlays.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45980,6 +45980,12 @@ paths:
4598045980
customMethod: false
4598145981
verb: createRollingIndex
4598245982
x-xgen-operation-id-override: createRollingIndex
45983+
x-xgen-atlascli:
45984+
override:
45985+
description: |
45986+
Creates an index on the cluster identified by its name in a rolling manner. Creating the index in this way allows index builds on one replica set member as a standalone at a time, starting with the secondary members. Creating indexes in this way requires at least one replica set election. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.
45987+
45988+
Warning: Building an index in a rolling fashion reduces the resiliency of your cluster and increases index build times. We only recommend using rolling index builds when regular index builds do not meet your needs.
4598345989
/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/onlineArchives:
4598445990
get:
4598545991
description: Returns details of all online archives. This archive stores data from one cluster within one project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.

0 commit comments

Comments
 (0)