-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Logsdb and source only snapshots. #122199
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
martijnvg
merged 22 commits into
elastic:main
from
martijnvg:logsdb_search_only_snapshots
Feb 13, 2025
Merged
Changes from 8 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
624a365
Logsdb and source only snapshots.
martijnvg 04c4bb1
suppress forbidden api usage
martijnvg a06803a
Merge remote-tracking branch 'es/main' into logsdb_search_only_snapshots
martijnvg 385e821
Update docs/changelog/122199.yaml
martijnvg 62334b3
removed unneeded annotation
martijnvg 6730822
Now that SFM doesn't get serialized the parser needs trigger validati…
martijnvg cd9beed
iter tests
martijnvg e7c36da
Merge remote-tracking branch 'es/main' into logsdb_search_only_snapshots
martijnvg f3c6a9d
update mapping asserts to account for empty _source:{} in bwc cases
martijnvg d4777d5
disable assertion jvm arg work around
martijnvg 43f9d5d
Revert changes to SFM's mode attribute initializer and instead disabl…
martijnvg f4bf08b
Merge remote-tracking branch 'es/main' into logsdb_search_only_snapshots
martijnvg 0e3d2f7
Merge remote-tracking branch 'es/main' into logsdb_search_only_snapshots
martijnvg e2addaf
added comment
martijnvg 29df0bc
hard code parameters
martijnvg 371229a
applied test feedback
martijnvg d1019f8
[CI] Auto commit changes from spotless
09e3988
iter
martijnvg 44ceea7
remove redundant test code
martijnvg 25ef316
Merge remote-tracking branch 'es/main' into logsdb_search_only_snapshots
martijnvg 297eccd
Merge remote-tracking branch 'es/main' into logsdb_search_only_snapshots
martijnvg cad4a03
Merge remote-tracking branch 'es/main' into logsdb_search_only_snapshots
martijnvg 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 122199 | ||
| summary: Logsdb and source only snapshots | ||
| area: Logs | ||
| type: bug | ||
| issues: [] |
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 |
|---|---|---|
|
|
@@ -176,7 +176,8 @@ public Builder( | |
| true, | ||
| () -> null, | ||
| (n, c, o) -> Mode.valueOf(o.toString().toUpperCase(Locale.ROOT)), | ||
| m -> toType(m).enabled.explicit() ? null : toType(m).mode, | ||
| // Avoid initializing _source.mode if it doesn't need to be serialized: | ||
| m -> toType(m).enabled.explicit() ? null : toType(m).serializeMode ? toType(m).mode : null, | ||
|
||
| (b, n, v) -> b.field(n, v.toString().toLowerCase(Locale.ROOT)), | ||
| v -> v.toString().toLowerCase(Locale.ROOT) | ||
| ).setMergeValidator((previous, current, conflicts) -> (previous == current) || current != Mode.STORED) | ||
|
|
@@ -300,10 +301,11 @@ private static SourceFieldMapper resolveStaticInstance(final Mode sourceMode) { | |
| if (indexMode == IndexMode.STANDARD && settingSourceMode == Mode.STORED) { | ||
| return DEFAULT; | ||
| } | ||
| SourceFieldMapper sourceFieldMapper = null; | ||
| if (onOrAfterDeprecateModeVersion(c.indexVersionCreated())) { | ||
| return resolveStaticInstance(settingSourceMode); | ||
| sourceFieldMapper = resolveStaticInstance(settingSourceMode); | ||
| } else { | ||
| return new SourceFieldMapper( | ||
| sourceFieldMapper = new SourceFieldMapper( | ||
| settingSourceMode, | ||
| Explicit.IMPLICIT_TRUE, | ||
| Strings.EMPTY_ARRAY, | ||
|
|
@@ -312,6 +314,10 @@ private static SourceFieldMapper resolveStaticInstance(final Mode sourceMode) { | |
| c.indexVersionCreated().onOrAfter(IndexVersions.SOURCE_MAPPER_MODE_ATTRIBUTE_NOOP) | ||
| ); | ||
| } | ||
| // By default no attributes are specified and so the Builder doesn't get used. | ||
| // Need to validate the returned instance based on index mode: | ||
| indexMode.validateSourceFieldMapper(sourceFieldMapper); | ||
| return sourceFieldMapper; | ||
| }, | ||
| c -> new Builder( | ||
| c.getIndexSettings().getMode(), | ||
|
|
||
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
Oops, something went wrong.
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.