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

Make the tsdb track compatible with Elasticsearch 7.17 #743

Merged
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
1 change: 1 addition & 0 deletions tsdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ This track allows to overwrite the following parameters using `--track-params`:
* `number_of_shards` (default: 1)
* `refresh_interval` (default not defined)
* `force_merge_max_num_segments` (default: unset): An integer specifying the max amount of segments the force-merge operation should use.
* `include_source_mode` (default: true): used to explicitly exclude `index.mapping.source.mode` setting when running with Elasticsearch v7.
* `source_mode` (default: synthetic): Should the `_source` be `stored` to disk exactly as sent (the Elasticsearch default outside of TSDB mode), thrown away (`disabled`), or reconstructed on the fly (`synthetic`)
* `index_mode` (default: time_series): Whether to make a standard index (`standard`) or time series index (`time_series`)
* `codec` (default: default): The codec to use compressing the index. `default` uses more space and less cpu. `best_compression` uses less space and more cpu.
Expand Down
16 changes: 10 additions & 6 deletions tsdb/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"clients": {{ search_clients | default(1) | int }},
"iterations": 100
}
{% if index_mode | default('time_series') is equalto 'time_series' and skip_running_tsdb_aggs is not defined %}
{% if p_index_mode == "time_series" and skip_running_tsdb_aggs is not defined %}
,{
"operation": "date-histo-memory-usage-hour",
"warmup-iterations": 50,
Expand All @@ -150,16 +150,17 @@
"warmup-iterations": 50,
"clients": {{ search_clients | default(1) | int }},
"iterations": 100
}
},
{% endif %}
,{
{
"operation": "esql-fetch-500",
"warmup-iterations": 50,
"clients": {{ search_clients | default(1) | int }},
"iterations": 100
}
]
},
}
{% if p_enable_downsample_challenge %},
{
"name": "downsample",
"description": "Indexes the whole document corpus and executes a few downsampling operations using different interval values",
Expand Down Expand Up @@ -281,7 +282,9 @@
"iterations": 100
}
]
},
}
{% endif %}
{% if p_enable_low_latency_challenge %},
{
"name": "low-latency",
"description": "Indexes the whole document corpus and executes low-latency queries. Assertions might result in race failure.",
Expand Down Expand Up @@ -383,7 +386,7 @@
}
}
{%- endif -%}{# serverless-post-ingest-sleep-marker-end #}
{% if index_mode | default('time_series') is equalto 'standard' %}
{% if p_index_mode != "time_series" and p_index_mode != "logsdb" %}
,{
"operation": "search_by_doc_id",
"warmup-iterations": 50,
Expand All @@ -407,3 +410,4 @@
{%- endif %}
]
}
{% endif %}
11 changes: 8 additions & 3 deletions tsdb/index-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% import "rally.helpers" as rally with context %}
{# TODO By default, source_mode should be "synthetic" if index_mode == "time_series" else "stored" #}
{% set p_source_mode = (source_mode | default("synthetic")) %}
{% set p_include_source_mode = (include_source_mode | default(true)) %}
{
"index_patterns": ["k8s*"],
"data_stream": {},
Expand All @@ -16,8 +17,10 @@
"refresh_interval": "{{refresh_interval}}",
{% endif %}
"codec": "{{codec | default('default')}}",
"mode": "{{index_mode | default('time_series')}}",
{% if index_mode | default('time_series') is equalto 'time_series' %}
{% if p_index_mode == "time_series" or p_index_mode == "logsdb" %}
"mode": "{{p_index_mode}}",
{% endif %}
{% if p_index_mode == "time_series" %}
"routing_path": [
"metricset.name",
"kubernetes.container.name",
Expand All @@ -35,8 +38,10 @@
{% if synthetic_source_keep %}
"synthetic_source_keep": "{{synthetic_source_keep}}",
{% endif %}
"total_fields.limit": 10000,
"total_fields.limit": 10000
{% if p_include_source_mode %},
"source.mode": {{ p_source_mode | tojson }}
{% endif %}
}
}
},
Expand Down
11 changes: 8 additions & 3 deletions tsdb/index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% import "rally.helpers" as rally with context %}
{# TODO By default, source_mode should be "synthetic" if index_mode == "time_series" else "stored" #}
{% set p_source_mode = (source_mode | default("synthetic")) %}
{% set p_include_source_mode = (include_source_mode | default(true)) %}
{
"settings": {
"index": {
Expand All @@ -13,11 +14,13 @@
{% endif %}
{%- endif -%}{# non-serverless-index-settings-marker-end #}
"codec": "{{codec | default('default')}}",
"mode": "{{index_mode | default('time_series')}}",
{% if p_index_mode == "time_series" or p_index_mode == "logsdb" %}
"mode": "{{p_index_mode}}",
{% endif %}
{% if refresh_interval %}
"refresh_interval": "{{refresh_interval}}",
{% endif %}
{% if index_mode | default('time_series') is equalto 'time_series' %}
{% if p_index_mode == "time_series" %}
"routing_path": [
"metricset.name",
"kubernetes.container.name",
Expand All @@ -35,8 +38,10 @@
{% if synthetic_source_keep %}
"synthetic_source_keep": "{{synthetic_source_keep}}",
{% endif %}
"total_fields.limit": 10000,
"total_fields.limit": 10000
{% if p_include_source_mode %},
"source.mode": {{ p_source_mode | tojson }}
{% endif %}
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions tsdb/operations/default.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% set p_document_ids = (document_ids | default(["Rpgg6gSYETjE4x8VrIAPNQ==", "AVdIG3TktHA+a3U2gW29QA==", "DeiNU57QgAml0UMiPg7hWA==", "3o6jhoyitLP3RPjSAEMRgQ=="])) %}
{% set p_include_time_series_aggs = (include_time_series_aggs | default(true)) %}

{
"name": "delete-doc-id-pipeline",
"operation-type": "raw-request",
Expand Down
4 changes: 4 additions & 0 deletions tsdb/track.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
{% set p_recovery_poll_timeout = (recovery_poll_timeout | default("1m")) %}
{% set p_recovery_max_operations_count = (recovery_max_operations_count | default(16777216)) %}

{% set p_index_mode = (index_mode | default("time_series")) %}
{% set p_enable_downsample_challenge = (enable_downsample_challenge | default(false)) %}
{% set p_enable_low_latency_challenge = (enable_low_latency_challenge | default(false)) %}

{
"version": 2,
"description": "metricbeat information for elastic-app k8s cluster",
Expand Down
Loading