-
Notifications
You must be signed in to change notification settings - Fork 221
Introduce a new operation to benchmark the shard changes recovery api #722
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
Merged
salvatore-campagna
merged 39 commits into
elastic:master
from
salvatore-campagna:feature/synthetic-source-recovery-challenge
Jan 22, 2025
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
9e2cc41
feature: new synthetic source recovery challenge
salvatore-campagna 3832110
fix: improve challenge description
salvatore-campagna 112da4f
fix: remove underscore
salvatore-campagna 67d45b7
fix: non-default challenge
salvatore-campagna f6aaf85
fix: default false
salvatore-campagna e2a6d71
fix: challenge name
salvatore-campagna 790d1a5
Merge branch 'master' into feature/synthetic-source-recovery-challenge
salvatore-campagna 75e06c3
fix: default security shard changes recovery target
salvatore-campagna 27a172a
fix: default tsdb shard changes recovery target
salvatore-campagna 617c34c
fix: default logs shard changes recovery target
salvatore-campagna e801b1c
fix: improve elastic/logs shard recovery
salvatore-campagna 3067434
fix: simplify logs shard changes challenge
salvatore-campagna 1e362d8
fix: replace challenge with new operation in existing challenge
salvatore-campagna 0708b06
fix: move shard-recovery operation out of if statement
salvatore-campagna 98e1bce
fix: p_recovery_target instead of recovery_target
salvatore-campagna c3cd16e
Merge branch 'master' into feature/synthetic-source-recovery-challenge
elasticmachine 162450a
fix: gate execution of shard-recovery operation
salvatore-campagna 7c8ace3
fix: update readme with include_shard_recovery_op param
salvatore-campagna 23c1075
Revert "fix: update readme with include_shard_recovery_op param"
salvatore-campagna 22da06f
Revert "fix: gate execution of shard-recovery operation"
salvatore-campagna 7af8cff
Revert "fix: p_recovery_target instead of recovery_target"
salvatore-campagna 421cd94
Revert "fix: move shard-recovery operation out of if statement"
salvatore-campagna 3099736
Revert "fix: replace challenge with new operation in existing challenge"
salvatore-campagna 8c01702
fix: add retention elase and remove max bucket setting
salvatore-campagna 5bb4b58
fix: missing comma
salvatore-campagna a5b83cc
fix: use variable name with default
salvatore-campagna 3d51874
fix: reduce warmup and iterations
salvatore-campagna cc9efd9
fix: increase warmup and iterations
salvatore-campagna 40aef67
fix: serverless markers
salvatore-campagna c052cef
fix: move misplaced comma
salvatore-campagna 4977014
fix: move misplaced comma
salvatore-campagna 7c48efd
fix: index mode only for tsdb
salvatore-campagna 4ab1173
fix: remove post ingest sleep
salvatore-campagna e83c1de
fix: remove condition on serverless operator
salvatore-campagna 8dd4f73
fix: move add-retention-lease before indexing
salvatore-campagna 00eb801
fix: remove misplaced commas
salvatore-campagna 9111582
fix: tsdb missing comma
salvatore-campagna 1d5e905
fix: further simplify synthetic-source-recovery challenge
salvatore-campagna 0422faf
fix: typo target instead of tagret
salvatore-campagna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| {% import "rally.helpers" as rally %} | ||
| { | ||
| "name": "synthetic-source-recovery", | ||
| "description": "Indexes logs for a specified time period and volume per day and then runs the recovery api fetching translog operations for a given target index.", | ||
| "default": false, | ||
| "schedule": [ | ||
| {% include "tasks/index-setup.json" %}, | ||
| {# serverless-shard-recovery-marker-start #}{%- if build_flavor != "serverless" -%} | ||
| { | ||
| "name": "add-retention-lease", | ||
| "operation": { | ||
| "operation-type": "raw-request", | ||
| "path": {{ "/%s/seq_no/add_retention_lease" | format(p_recovery_target) | tojson }}, | ||
| "method": "PUT" | ||
| }, | ||
| "warmup-iterations": 0, | ||
| "iterations": 1 | ||
| }, | ||
| {%- endif -%}{# serverless-shard-recovery-marker-end #} | ||
| { | ||
| "name": "bulk-index", | ||
| "operation": { | ||
| "operation-type": "raw-bulk", | ||
| "param-source": "processed-source", | ||
| "time-format": "milliseconds", | ||
| "profile": "fixed_interval", | ||
| "init-load": true, | ||
| "bulk-size": {{ p_bulk_size }}, | ||
| "detailed-results": true | ||
| }, | ||
| "clients": {{ p_bulk_indexing_clients }}, | ||
| "ignore-response-error-level": "{{error_level | default('non-fatal')}}" | ||
| } | ||
| {# serverless-shard-recovery-marker-start #}{%- if build_flavor != "serverless" -%} | ||
| , | ||
| { | ||
| "name": "shard-recovery", | ||
| "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 }}, | ||
| "poll_timeout": {{ p_recovery_poll_timeout | tojson }}, | ||
| "max_operations_count": {{ p_recovery_max_operations_count | tojson }} | ||
| } | ||
| }, | ||
| "warmup-iterations": 10, | ||
| "iterations": 20 | ||
| } | ||
| {%- endif -%}{# serverless-shard-recovery-marker-end #} | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
elastic/security/challenges/synthetic-source-recovery.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| {% import "rally.helpers" as rally %} | ||
| { | ||
| "name": "synthetic-source-recovery", | ||
| "description": "Indexes security data for a specified time period and volume per day and then runs the recovery api fetching translog operations for a given target index.", | ||
| "default": false, | ||
| "schedule": [ | ||
| {% include "tasks/index-setup.json" %}, | ||
| {# serverless-shard-recovery-marker-start #}{%- if build_flavor != "serverless" -%} | ||
| { | ||
| "name": "add-retention-lease", | ||
| "operation": { | ||
| "operation-type": "raw-request", | ||
| "path": {{ "/%s/seq_no/add_retention_lease" | format(p_recovery_target) | tojson }}, | ||
| "method": "PUT" | ||
| }, | ||
| "warmup-iterations": 0, | ||
| "iterations": 1 | ||
| }, | ||
| {%- endif -%}{# serverless-shard-recovery-marker-end #} | ||
| { | ||
| "name": "bulk-index", | ||
| "operation": { | ||
| "operation-type": "raw-bulk", | ||
| "param-source": "processed-source", | ||
| "time-format": "milliseconds", | ||
| "profile": "fixed_interval", | ||
| "detailed-results": true, | ||
| "bulk-size": {{ (bulk_size | default(50)) }} | ||
| }, | ||
| "ingest-percentage": {{ ingest_percentage | default(100) }}, | ||
| "clients": {{ p_bulk_indexing_clients }} | ||
| } | ||
| {# serverless-shard-recovery-marker-start #}{%- if build_flavor != "serverless" -%} | ||
| , | ||
| { | ||
| "name": "shard-recovery", | ||
| "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 }}, | ||
| "poll_timeout": {{ p_recovery_poll_timeout | tojson }}, | ||
| "max_operations_count": {{ p_recovery_max_operations_count | tojson }} | ||
| } | ||
| }, | ||
| "warmup-iterations": 10, | ||
| "iterations": 20 | ||
| } | ||
| {%- endif -%}{# serverless-shard-recovery-marker-end #} | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| { | ||
| "name": "synthetic-source-recovery", | ||
| "description": "Indexes the whole document corpus and then runs the recovery api fetching translog operations for a given target index.", | ||
| "default": false, | ||
| "schedule": [ | ||
| { | ||
| "operation": "delete-index" | ||
| }, | ||
| { | ||
| "operation": { | ||
| "operation-type": "create-index", | ||
| "settings": {{index_settings | default({}) | tojson}} | ||
| } | ||
| }, | ||
| { | ||
| "name": "check-cluster-health", | ||
| "operation": { | ||
| "operation-type": "cluster-health", | ||
| "index": "tsdb", | ||
| "request-params": { | ||
| "wait_for_status": "{{cluster_health | default('green')}}", | ||
| "wait_for_no_relocating_shards": "true" | ||
| }, | ||
| "retry-until-success": true | ||
| } | ||
| }, | ||
| {# serverless-shard-recovery-marker-start #}{%- if build_flavor != "serverless" -%} | ||
| { | ||
| "name": "add-retention-lease", | ||
| "operation": { | ||
| "operation-type": "raw-request", | ||
| "path": {{ "/%s/seq_no/add_retention_lease" | format(p_recovery_target) | tojson }}, | ||
| "method": "PUT" | ||
| }, | ||
| "warmup-iterations": 0, | ||
| "iterations": 1 | ||
| }, | ||
| {%- endif -%}{# serverless-shard-recovery-marker-end #} | ||
| { | ||
| "operation": "index", | ||
| "warmup-time-period": 240, | ||
| "clients": {{bulk_indexing_clients | default(8)}}, | ||
| "ignore-response-error-level": "{{error_level | default('non-fatal')}}" | ||
| } | ||
| {# serverless-shard-recovery-marker-start #}{%- if build_flavor != "serverless" -%} | ||
| , | ||
| { | ||
|
martijnvg marked this conversation as resolved.
|
||
| "name": "shard-recovery", | ||
| "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 }}, | ||
| "poll_timeout": {{ p_recovery_poll_timeout | tojson }}, | ||
| "max_operations_count": {{ p_recovery_max_operations_count | tojson }} | ||
| } | ||
| }, | ||
| "warmup-iterations": 10, | ||
| "iterations": 20 | ||
| } | ||
| {%- endif -%}{# serverless-shard-recovery-marker-end #} | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.