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

Two shard recovery requests with different batch size #731

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
5 changes: 3 additions & 2 deletions elastic/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ The following parameters are available:
* `recovery_target` (required) - The target index or data stream for fetching shard changes via the recovery API.
* `recovery_from_seq_no` (default: `0`) - The sequence number from which to start fetching translog operations.
* `recovery_poll_timeout` (default: `1m`) - The maximum time to wait for additional translog operations before returning an empty result.
* `recovery_max_batch_size` (default: `32MB`) - The maximum estimated size for the batch of translog operations to return.
* `recovery_max_operations_count` (default: `1048576`) - The maximum number of translog operations to return in a single batch.
* `recovery_small_max_batch_size` (default: `4MB`) - The maximum estimated size for the batch of translog operations to return.
* `recovery_large_max_batch_size` (default: `32MB`) - The maximum estimated size for the batch of translog operations to return.
* `recovery_max_operations_count` (default: `16777216`) - The maximum number of translog operations to return in a single batch.

### Data Download Parameters

Expand Down
20 changes: 18 additions & 2 deletions elastic/logs/challenges/synthetic-source-recovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,30 @@
{# serverless-shard-recovery-marker-start #}{%- if build_flavor != "serverless" -%}
,
{
"name": "shard-recovery",
"name": "shard-recovery-small",
"operation": {
"operation-type": "raw-request",
"path": {{ "/%s/ccr/shard_changes" | format(p_recovery_target) | tojson }},
"method": "GET",
"request-params": {
"from_seq_no": {{ p_recovery_from_seq_no | tojson }},
"max_batch_size": {{ p_recovery_max_batch_size | tojson }},
"max_batch_size": {{ p_recovery_small_max_batch_size | tojson }},
"poll_timeout": {{ p_recovery_poll_timeout | tojson }},
"max_operations_count": {{ p_recovery_max_operations_count | tojson }}
}
},
"warmup-iterations": 10,
"iterations": 20
},
{
"name": "shard-recovery-large",
"operation": {
"operation-type": "raw-request",
"path": {{ "/%s/ccr/shard_changes" | format(p_recovery_target) | tojson }},
"method": "GET",
"request-params": {
"from_seq_no": {{ p_recovery_from_seq_no | tojson }},
"max_batch_size": {{ p_recovery_large_max_batch_size | tojson }},
"poll_timeout": {{ p_recovery_poll_timeout | tojson }},
"max_operations_count": {{ p_recovery_max_operations_count | tojson }}
}
Expand Down
5 changes: 3 additions & 2 deletions elastic/logs/track.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@

{% set p_recovery_target = (recovery_target | default('logs-k8-application.log-default') ) %}
{% set p_recovery_from_seq_no = (recovery_seq_no | default(0) ) %}
{% set p_recovery_max_batch_size = (recovery_max_batch_size | default ("32MB") ) %}
{% set p_recovery_small_max_batch_size = (recovery_small_max_batch_size | default ("512kB") ) %}
{% set p_recovery_large_max_batch_size = (recovery_large_max_batch_size | default ("32MB") ) %}
{% set p_recovery_poll_timeout = (recovery_poll_timeout | default("1m")) %}
{% set p_recovery_max_operations_count = (recovery_max_operations_count | default(1048576)) %}
{% set p_recovery_max_operations_count = (recovery_max_operations_count | default(16777216)) %}

{% set p_worker_threads_enabled = (worker_threads_enabled | default(true)) %}

Expand Down
5 changes: 3 additions & 2 deletions tsdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ This track allows to overwrite the following parameters using `--track-params`:
* `recovery_target` (required) - The target index or data stream for fetching shard changes via the recovery API.
* `recovery_from_seq_no` (default: `0`) - The sequence number from which to start fetching translog operations.
* `recovery_poll_timeout` (default: `1m`) - The maximum time to wait for additional translog operations before returning an empty result.
* `recovery_max_batch_size` (default: `32MB`) - The maximum estimated size for the batch of translog operations to return.
* `recovery_max_operations_count` (default: `1048576`) - The maximum number of translog operations to return in a single batch.
* `recovery_small_max_batch_size` (default: `4MB`) - The maximum estimated size for the batch of translog operations to return.
* `recovery_large_max_batch_size` (default: `32MB`) - The maximum estimated size for the batch of translog operations to return.
* `recovery_max_operations_count` (default: `16777216`) - The maximum number of translog operations to return in a single batch.

### License

Expand Down
20 changes: 18 additions & 2 deletions tsdb/challenges/synthetic-source-recovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,30 @@
{# serverless-shard-recovery-marker-start #}{%- if build_flavor != "serverless" -%}
,
{
"name": "shard-recovery",
"name": "shard-recovery-small",
"operation": {
"operation-type": "raw-request",
"path": {{ "/%s/ccr/shard_changes" | format(p_recovery_target) | tojson }},
"method": "GET",
"request-params": {
"from_seq_no": {{ p_recovery_from_seq_no | tojson }},
"max_batch_size": {{ p_recovery_max_batch_size | tojson }},
"max_batch_size": {{ p_recovery_small_max_batch_size | tojson }},
"poll_timeout": {{ p_recovery_poll_timeout | tojson }},
"max_operations_count": {{ p_recovery_max_operations_count | tojson }}
}
},
"warmup-iterations": 10,
"iterations": 20
},
{
"name": "shard-recovery-large",
"operation": {
"operation-type": "raw-request",
"path": {{ "/%s/ccr/shard_changes" | format(p_recovery_target) | tojson }},
"method": "GET",
"request-params": {
"from_seq_no": {{ p_recovery_from_seq_no | tojson }},
"max_batch_size": {{ p_recovery_large_max_batch_size | tojson }},
"poll_timeout": {{ p_recovery_poll_timeout | tojson }},
"max_operations_count": {{ p_recovery_max_operations_count | tojson }}
}
Expand Down
5 changes: 3 additions & 2 deletions tsdb/track.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

{% set p_recovery_target = ( recovery_target | default('tsdb') ) %}
{% set p_recovery_from_seq_no = (recovery_seq_no | default(0) ) %}
{% set p_recovery_max_batch_size = (recovery_max_batch_size | default ("32MB") ) %}
{% set p_recovery_small_max_batch_size = (recovery_small_max_batch_size | default ("512kB") ) %}
{% set p_recovery_large_max_batch_size = (recovery_large_max_batch_size | default ("32MB") ) %}
{% set p_recovery_poll_timeout = (recovery_poll_timeout | default("1m")) %}
{% set p_recovery_max_operations_count = (recovery_max_operations_count | default(1048576)) %}
{% set p_recovery_max_operations_count = (recovery_max_operations_count | default(16777216)) %}

{
"version": 2,
Expand Down
Loading