Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing fields to CreateFollowIndexRequest #3042

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 70 additions & 11 deletions specification/ccr/follow/CreateFollowIndexRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
* under the License.
*/

import { IndexSettings } from '@indices/_types/IndexSettings'
import { RequestBase } from '@_types/Base'
import { IndexName, WaitForActiveShards } from '@_types/common'
import { long } from '@_types/Numeric'
import { ByteSize, IndexName, WaitForActiveShards } from '@_types/common'
import { integer, long } from '@_types/Numeric'
import { Duration } from '@_types/Time'

/**
Expand All @@ -29,23 +30,81 @@ import { Duration } from '@_types/Time'
*/
export interface Request extends RequestBase {
path_parts: {
/**
* The name of the follower index.
*/
index: IndexName
}
query_parameters: {
/**
* Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be
* active.
* A shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the
* remote Lucene segment files to the follower index.
*/
wait_for_active_shards?: WaitForActiveShards
}
body: {
leader_index?: IndexName
/**
* 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.
*/
data_stream_name?: string
/**
* The name of the index in the leader cluster to follow.
*/
leader_index: IndexName
/**
* The maximum number of outstanding reads requests from the remote cluster.
*/
max_outstanding_read_requests?: long
max_outstanding_write_requests?: long
max_read_request_operation_count?: long
max_read_request_size?: string
/**
* The maximum number of outstanding write requests on the follower.
*/
max_outstanding_write_requests?: integer
/**
* The maximum number of operations to pull per read from the remote cluster.
*/
max_read_request_operation_count?: integer
/**
* The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
*/
max_read_request_size?: ByteSize
/**
* The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when
* retrying.
*/
max_retry_delay?: Duration
max_write_buffer_count?: long
max_write_buffer_size?: string
max_write_request_operation_count?: long
max_write_request_size?: string
/**
* The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be
* deferred until the number of queued operations goes below the limit.
*/
max_write_buffer_count?: integer
/**
* The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will
* be deferred until the total bytes of queued operations goes below the limit.
*/
max_write_buffer_size?: ByteSize
/**
* The maximum number of operations per bulk write request executed on the follower.
*/
max_write_request_operation_count?: integer
/**
* The maximum total bytes of operations per bulk write request executed on the follower.
*/
max_write_request_size?: ByteSize
/**
* The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.
* When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.
* Then the follower will immediately attempt to read from the leader again.
*/
read_poll_timeout?: Duration
remote_cluster?: string
/**
* The remote cluster containing the leader index.
*/
remote_cluster: string
/**
* Settings to override from the leader index.
*/
settings?: IndexSettings
}
}
59 changes: 47 additions & 12 deletions specification/ccr/follow_info/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* under the License.
*/

import { IndexName, Name } from '@_types/common'
import { integer } from '@_types/Numeric'
import { ByteSize, IndexName, Name } from '@_types/common'
import { integer, long } from '@_types/Numeric'
import { Duration } from '@_types/Time'

export class FollowerIndex {
Expand All @@ -35,14 +35,49 @@ export enum FollowerIndexStatus {
}

export class FollowerIndexParameters {
max_outstanding_read_requests: integer
max_outstanding_write_requests: integer
max_read_request_operation_count: integer
max_read_request_size: string
max_retry_delay: Duration
max_write_buffer_count: integer
max_write_buffer_size: string
max_write_request_operation_count: integer
max_write_request_size: string
read_poll_timeout: Duration
/**
* The maximum number of outstanding reads requests from the remote cluster.
*/
max_outstanding_read_requests?: long
/**
* The maximum number of outstanding write requests on the follower.
*/
max_outstanding_write_requests?: integer
/**
* The maximum number of operations to pull per read from the remote cluster.
*/
max_read_request_operation_count?: integer
/**
* The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.
*/
max_read_request_size?: ByteSize
/**
* The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when
* retrying.
*/
max_retry_delay?: Duration
/**
* The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be
* deferred until the number of queued operations goes below the limit.
*/
max_write_buffer_count?: integer
/**
* The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will
* be deferred until the total bytes of queued operations goes below the limit.
*/
max_write_buffer_size?: ByteSize
/**
* The maximum number of operations per bulk write request executed on the follower.
*/
max_write_request_operation_count?: integer
/**
* The maximum total bytes of operations per bulk write request executed on the follower.
*/
max_write_request_size?: ByteSize
/**
* The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index.
* When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics.
* Then the follower will immediately attempt to read from the leader again.
*/
read_poll_timeout?: Duration
}
Loading