-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Use a new synthetic _id format for time-series datastreams #137274
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 13 commits
e562e8c
9a9df49
39e6cd4
f6234c3
51d66a3
6fd8a69
9babebf
8cfa2fa
46cc58b
d885dda
b22f59c
ab2be04
63911a7
b50b64c
933e280
ad94e5d
4662f94
b3428c7
3f81d60
15a1e4c
d71316d
96eb36a
136a267
dda5531
3b22c46
6a4a9e1
546e23b
5529733
7e82813
d731f9f
eb05d57
3655dc3
59687e8
608ff67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,7 +107,7 @@ public final class IndexSortConfig { | |
| ); | ||
|
|
||
| public static class IndexSortConfigDefaults { | ||
| public static final FieldSortSpec[] TIME_SERIES_SORT, HOSTNAME_TIMESTAMP_BWC_SORT; | ||
| public static final FieldSortSpec[] TIME_SERIES_SORT, TIME_SERIES_WITH_SYNTHETIC_ID_SORT, HOSTNAME_TIMESTAMP_BWC_SORT; | ||
|
|
||
| private static final FieldSortSpec HOSTNAME_SPEC, MESSAGE_PATTERN_SPEC, TIMESTAMP_SPEC; | ||
|
|
||
|
|
@@ -116,6 +116,10 @@ public static class IndexSortConfigDefaults { | |
| TIMESTAMP_SPEC.order = SortOrder.DESC; | ||
| TIME_SERIES_SORT = new FieldSortSpec[] { new FieldSortSpec(TimeSeriesIdFieldMapper.NAME), TIMESTAMP_SPEC }; | ||
|
|
||
| TIME_SERIES_WITH_SYNTHETIC_ID_SORT = new FieldSortSpec[] { | ||
| new FieldSortSpec(TimeSeriesIdFieldMapper.NAME), | ||
| new FieldSortSpec(DataStreamTimestampFieldMapper.DEFAULT_PATH) }; | ||
|
||
|
|
||
| HOSTNAME_SPEC = new FieldSortSpec(IndexMode.HOST_NAME); | ||
| HOSTNAME_SPEC.order = SortOrder.ASC; | ||
| HOSTNAME_SPEC.missingValue = "_last"; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I wonder if we would see some performance degradation from all this new branching? I won't expect it to be important but I wanted to mention it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this specific branch is OK, but your comment made me think about how the IndexRouting is instanciated, and we don't want to read the
USE_SYNTHETIC_IDsetting for routing every operation.So I pushed 933e280 to compute the
useTimeSeriesSyntheticIdflag once and for all whenIndexMetadataare built, and uses this flag for routing operations.