-
Notifications
You must be signed in to change notification settings - Fork 26k
Enable synthetic_id by default under feature flag #144026
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
Changes from 14 commits
644777c
fec3891
f45455b
2ad61ba
c10e955
d299af1
8358b29
e050b55
2934324
64b7f9d
299b2e9
60a03c7
4cfaacf
6ca2f5f
9214cb4
d5c2caf
d830bb7
3d3c039
0c5c514
b2681f7
cc8a4bb
22c2032
c6a5c82
c2cf400
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,4 +158,16 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task -> | |
| "get/100_synthetic_source/fields with ignore_malformed", | ||
| "Malformed values are now stored in binary doc values which sort differently than stored fields" | ||
| ) | ||
| task.skipTest("delete/70_tsdb/basic tsdb delete", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/routing_path matches object", "ids have changed after introduction of synthetic id") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't we set the setting to false in this test suite?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only for the compatibility tests. They copy the old yaml file from the bwc branch and updating all of those is not worth it IMO. |
||
| task.skipTest("tsdb/25_id_generation/ids query", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/create operation on top of old document fails over bulk", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/delete over _bulk", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/delete", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/index a new document on top of an old one", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/generates a consistent id", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/create operation on top of old document fails", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/get", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/routing_path matches deep object", "ids have changed after introduction of synthetic id") | ||
| task.skipTest("tsdb/25_id_generation/index a new document on top of an old one over bulk", "ids have changed after introduction of synthetic id") | ||
| }) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -681,8 +681,43 @@ public boolean isES87TSDBCodecEnabled() { | |
| Property.Final | ||
| ); | ||
|
|
||
| /** | ||
| * The {@link IndexMode "mode"} of the index. | ||
| */ | ||
| public static final Setting<IndexMode> MODE = Setting.enumSetting( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed to move this to have access in |
||
| IndexMode.class, | ||
| "index.mode", | ||
| IndexMode.STANDARD, | ||
| new Setting.Validator<>() { | ||
| @Override | ||
| public void validate(IndexMode value) {} | ||
|
|
||
| @Override | ||
| public void validate(IndexMode value, Map<Setting<?>, Object> settings) { | ||
| value.validateWithOtherSettings(settings); | ||
| } | ||
|
|
||
| @Override | ||
| public Iterator<Setting<?>> settings() { | ||
| return IndexMode.VALIDATE_WITH_SETTINGS.iterator(); | ||
| } | ||
| }, | ||
| Property.IndexScope, | ||
| Property.Final, | ||
| Property.ServerlessPublic | ||
| ); | ||
|
|
||
| public static final boolean TSDB_SYNTHETIC_ID_FEATURE_FLAG = new FeatureFlag("tsdb_synthetic_id").isEnabled(); | ||
| public static final Setting<Boolean> SYNTHETIC_ID = Setting.boolSetting("index.mapping.synthetic_id", false, new Setting.Validator<>() { | ||
| public static final Setting<Boolean> SYNTHETIC_ID = Setting.boolSetting("index.mapping.synthetic_id", settings -> { | ||
| IndexVersion indexVersion = SETTING_INDEX_VERSION_CREATED.get(settings); | ||
| IndexMode indexMode = MODE.get(settings); | ||
| String codec = INDEX_CODEC_SETTING.get(settings); | ||
| boolean onByDefault = indexVersion.onOrAfter(IndexVersions.TIME_SERIES_USE_SYNTHETIC_ID_DEFAULT); | ||
| return TSDB_SYNTHETIC_ID_FEATURE_FLAG | ||
| && IndexMode.TIME_SERIES.equals(indexMode) | ||
| && CodecService.DEFAULT_CODEC.equalsIgnoreCase(codec) | ||
| && onByDefault ? Boolean.TRUE.toString() : Boolean.FALSE.toString(); | ||
|
burqen marked this conversation as resolved.
|
||
| }, new Setting.Validator<>() { | ||
| @Override | ||
| public void validate(Boolean enabled) { | ||
| if (enabled) { | ||
|
|
@@ -717,7 +752,7 @@ public void validate(Boolean enabled, Map<Setting<?>, Object> settings) { | |
| } | ||
|
|
||
| var codecName = (String) settings.get(INDEX_CODEC_SETTING); | ||
| if (codecName.equals(CodecService.DEFAULT_CODEC) == false) { | ||
| if (codecName.equalsIgnoreCase(CodecService.DEFAULT_CODEC) == false) { | ||
| throw new IllegalArgumentException( | ||
| String.format( | ||
| Locale.ROOT, | ||
|
|
@@ -757,32 +792,6 @@ public Iterator<Setting<?>> settings() { | |
| } | ||
| }, Property.IndexScope, Property.Final); | ||
|
|
||
| /** | ||
| * The {@link IndexMode "mode"} of the index. | ||
| */ | ||
| public static final Setting<IndexMode> MODE = Setting.enumSetting( | ||
| IndexMode.class, | ||
| "index.mode", | ||
| IndexMode.STANDARD, | ||
| new Setting.Validator<>() { | ||
| @Override | ||
| public void validate(IndexMode value) {} | ||
|
|
||
| @Override | ||
| public void validate(IndexMode value, Map<Setting<?>, Object> settings) { | ||
| value.validateWithOtherSettings(settings); | ||
| } | ||
|
|
||
| @Override | ||
| public Iterator<Setting<?>> settings() { | ||
| return IndexMode.VALIDATE_WITH_SETTINGS.iterator(); | ||
| } | ||
| }, | ||
| Property.IndexScope, | ||
| Property.Final, | ||
| Property.ServerlessPublic | ||
| ); | ||
|
|
||
| public static final Setting<Boolean> USE_DOC_VALUES_SKIPPER = Setting.boolSetting("index.mapping.use_doc_values_skipper", s -> { | ||
| IndexVersion iv = SETTING_INDEX_VERSION_CREATED.get(s); | ||
| if (MODE.get(s) == IndexMode.TIME_SERIES) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.