TSDB: Cleaner trigger for tsdb boundary check#81263
Merged
elasticsearchmachine merged 6 commits intoelastic:masterfrom Dec 6, 2021
Merged
TSDB: Cleaner trigger for tsdb boundary check#81263elasticsearchmachine merged 6 commits intoelastic:masterfrom
elasticsearchmachine merged 6 commits intoelastic:masterfrom
Conversation
This replaces the hard check for "are we in time series mode" with a check for whether we have declared a time range for the index. It makes me feel a little better not to have `if (mode == TIME_SERIES)` tests. I just think they make it harder to reason about what's going on. Instead, this code says "if there are settings declaring a time range for this index we should enforce that range".
Collaborator
|
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Member
Author
|
@weizijun you might also want to have a look at this. It just makes me feel a little better than the other way. Not super important though. |
Contributor
LGTM. And I left a comment |
Member
Author
@weizijun I didn't get your comment. |
Contributor
It's that validateTimestamp is a public method, is it to be private? |
Member
Author
👍 private is better, yeah. |
Member
Author
|
@elasticmachine update branch |
Member
Author
|
@elasticmachine update branch |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This replaces the hard check for "are we in time series mode" with a
check for whether we have declared a time range for the index. It makes
me feel a little better not to have
if (mode == TIME_SERIES)tests. Ijust think they make it harder to reason about what's going on. Instead,
this code says "if there are settings declaring a time range for this
index we should enforce that range".