Skip to content

Commit d633341

Browse files
authored
Add missing fields to CreateFollowIndexRequest (#3042)
1 parent ddf9cd9 commit d633341

File tree

2 files changed

+117
-23
lines changed

2 files changed

+117
-23
lines changed

specification/ccr/follow/CreateFollowIndexRequest.ts

Lines changed: 70 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
* under the License.
1818
*/
1919

20+
import { IndexSettings } from '@indices/_types/IndexSettings'
2021
import { RequestBase } from '@_types/Base'
21-
import { IndexName, WaitForActiveShards } from '@_types/common'
22-
import { long } from '@_types/Numeric'
22+
import { ByteSize, IndexName, WaitForActiveShards } from '@_types/common'
23+
import { integer, long } from '@_types/Numeric'
2324
import { Duration } from '@_types/Time'
2425

2526
/**
@@ -29,23 +30,81 @@ import { Duration } from '@_types/Time'
2930
*/
3031
export interface Request extends RequestBase {
3132
path_parts: {
33+
/**
34+
* The name of the follower index.
35+
*/
3236
index: IndexName
3337
}
3438
query_parameters: {
39+
/**
40+
* Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be
41+
* active.
42+
* A shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the
43+
* remote Lucene segment files to the follower index.
44+
*/
3545
wait_for_active_shards?: WaitForActiveShards
3646
}
3747
body: {
38-
leader_index?: IndexName
48+
/**
49+
* If the leader index is part of a data stream, the name to which the local data stream for the followed index should be renamed.
50+
*/
51+
data_stream_name?: string
52+
/**
53+
* The name of the index in the leader cluster to follow.
54+
*/
55+
leader_index: IndexName
56+
/**
57+
* The maximum number of outstanding reads requests from the remote cluster.
58+
*/
3959
max_outstanding_read_requests?: long
40-
max_outstanding_write_requests?: long
41-
max_read_request_operation_count?: long
42-
max_read_request_size?: string
60+
/**
61+
* The maximum number of outstanding write requests on the follower.
62+
*/
63+
max_outstanding_write_requests?: integer
64+
/**
65+
* The maximum number of operations to pull per read from the remote cluster.
66+
*/
67+
max_read_request_operation_count?: integer
68+
/**
69+
* The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
70+
*/
71+
max_read_request_size?: ByteSize
72+
/**
73+
* The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when
74+
* retrying.
75+
*/
4376
max_retry_delay?: Duration
44-
max_write_buffer_count?: long
45-
max_write_buffer_size?: string
46-
max_write_request_operation_count?: long
47-
max_write_request_size?: string
77+
/**
78+
* The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be
79+
* deferred until the number of queued operations goes below the limit.
80+
*/
81+
max_write_buffer_count?: integer
82+
/**
83+
* The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will
84+
* be deferred until the total bytes of queued operations goes below the limit.
85+
*/
86+
max_write_buffer_size?: ByteSize
87+
/**
88+
* The maximum number of operations per bulk write request executed on the follower.
89+
*/
90+
max_write_request_operation_count?: integer
91+
/**
92+
* The maximum total bytes of operations per bulk write request executed on the follower.
93+
*/
94+
max_write_request_size?: ByteSize
95+
/**
96+
* The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.
97+
* When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.
98+
* Then the follower will immediately attempt to read from the leader again.
99+
*/
48100
read_poll_timeout?: Duration
49-
remote_cluster?: string
101+
/**
102+
* The remote cluster containing the leader index.
103+
*/
104+
remote_cluster: string
105+
/**
106+
* Settings to override from the leader index.
107+
*/
108+
settings?: IndexSettings
50109
}
51110
}

specification/ccr/follow_info/types.ts

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* under the License.
1818
*/
1919

20-
import { IndexName, Name } from '@_types/common'
21-
import { integer } from '@_types/Numeric'
20+
import { ByteSize, IndexName, Name } from '@_types/common'
21+
import { integer, long } from '@_types/Numeric'
2222
import { Duration } from '@_types/Time'
2323

2424
export class FollowerIndex {
@@ -35,14 +35,49 @@ export enum FollowerIndexStatus {
3535
}
3636

3737
export class FollowerIndexParameters {
38-
max_outstanding_read_requests: integer
39-
max_outstanding_write_requests: integer
40-
max_read_request_operation_count: integer
41-
max_read_request_size: string
42-
max_retry_delay: Duration
43-
max_write_buffer_count: integer
44-
max_write_buffer_size: string
45-
max_write_request_operation_count: integer
46-
max_write_request_size: string
47-
read_poll_timeout: Duration
38+
/**
39+
* The maximum number of outstanding reads requests from the remote cluster.
40+
*/
41+
max_outstanding_read_requests?: long
42+
/**
43+
* The maximum number of outstanding write requests on the follower.
44+
*/
45+
max_outstanding_write_requests?: integer
46+
/**
47+
* The maximum number of operations to pull per read from the remote cluster.
48+
*/
49+
max_read_request_operation_count?: integer
50+
/**
51+
* The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
52+
*/
53+
max_read_request_size?: ByteSize
54+
/**
55+
* The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when
56+
* retrying.
57+
*/
58+
max_retry_delay?: Duration
59+
/**
60+
* The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be
61+
* deferred until the number of queued operations goes below the limit.
62+
*/
63+
max_write_buffer_count?: integer
64+
/**
65+
* The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will
66+
* be deferred until the total bytes of queued operations goes below the limit.
67+
*/
68+
max_write_buffer_size?: ByteSize
69+
/**
70+
* The maximum number of operations per bulk write request executed on the follower.
71+
*/
72+
max_write_request_operation_count?: integer
73+
/**
74+
* The maximum total bytes of operations per bulk write request executed on the follower.
75+
*/
76+
max_write_request_size?: ByteSize
77+
/**
78+
* The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.
79+
* When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.
80+
* Then the follower will immediately attempt to read from the leader again.
81+
*/
82+
read_poll_timeout?: Duration
4883
}

0 commit comments

Comments
 (0)