Skip to content

Commit c34e26d

Browse files
pquentinflobernd
andauthored
Add missing fields to CreateFollowIndexRequest (#3042) (#3415)
(cherry picked from commit d633341) Co-authored-by: Florian Bernd <[email protected]>
1 parent 04f3f50 commit c34e26d

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
/**
@@ -32,23 +33,81 @@ import { Duration } from '@_types/Time'
3233
*/
3334
export interface Request extends RequestBase {
3435
path_parts: {
36+
/**
37+
* The name of the follower index.
38+
*/
3539
index: IndexName
3640
}
3741
query_parameters: {
42+
/**
43+
* Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be
44+
* active.
45+
* A shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the
46+
* remote Lucene segment files to the follower index.
47+
*/
3848
wait_for_active_shards?: WaitForActiveShards
3949
}
4050
body: {
41-
leader_index?: IndexName
51+
/**
52+
* 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.
53+
*/
54+
data_stream_name?: string
55+
/**
56+
* The name of the index in the leader cluster to follow.
57+
*/
58+
leader_index: IndexName
59+
/**
60+
* The maximum number of outstanding reads requests from the remote cluster.
61+
*/
4262
max_outstanding_read_requests?: long
43-
max_outstanding_write_requests?: long
44-
max_read_request_operation_count?: long
45-
max_read_request_size?: string
63+
/**
64+
* The maximum number of outstanding write requests on the follower.
65+
*/
66+
max_outstanding_write_requests?: integer
67+
/**
68+
* The maximum number of operations to pull per read from the remote cluster.
69+
*/
70+
max_read_request_operation_count?: integer
71+
/**
72+
* The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
73+
*/
74+
max_read_request_size?: ByteSize
75+
/**
76+
* The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when
77+
* retrying.
78+
*/
4679
max_retry_delay?: Duration
47-
max_write_buffer_count?: long
48-
max_write_buffer_size?: string
49-
max_write_request_operation_count?: long
50-
max_write_request_size?: string
80+
/**
81+
* The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be
82+
* deferred until the number of queued operations goes below the limit.
83+
*/
84+
max_write_buffer_count?: integer
85+
/**
86+
* The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will
87+
* be deferred until the total bytes of queued operations goes below the limit.
88+
*/
89+
max_write_buffer_size?: ByteSize
90+
/**
91+
* The maximum number of operations per bulk write request executed on the follower.
92+
*/
93+
max_write_request_operation_count?: integer
94+
/**
95+
* The maximum total bytes of operations per bulk write request executed on the follower.
96+
*/
97+
max_write_request_size?: ByteSize
98+
/**
99+
* The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.
100+
* When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.
101+
* Then the follower will immediately attempt to read from the leader again.
102+
*/
51103
read_poll_timeout?: Duration
52-
remote_cluster?: string
104+
/**
105+
* The remote cluster containing the leader index.
106+
*/
107+
remote_cluster: string
108+
/**
109+
* Settings to override from the leader index.
110+
*/
111+
settings?: IndexSettings
53112
}
54113
}

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)