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

Use tsdb's id in Engine tests #85055

Merged
merged 2 commits into from
Mar 21, 2022
Merged

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Mar 17, 2022

This should be enough to detect if tsdb's _id field mapper changes
enough to cause trouble for Engine. I suspect that in the end we'll
need something more like the changes that #84996 did for
RecoverySourceHandlerTests but that's a much bigger change that I'd
prefer to hold back until we need it. If tsdb's _id field mapper
changes enough to cause trouble for Engine.

@nik9000 nik9000 added >test Issues or PRs that are addressing/adding tests :StorageEngine/TSDB You know, for Metrics v8.2.0 labels Mar 17, 2022
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 17, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

This should be enough to detect if tsdb's `_id` field mapper changes
enough to cause trouble for `Engine`. I suspect that in the end we'll
need something more like the changes that elastic#84996 did for
RecoverySourceHandlerTests but that's a much bigger change that I'd
prefer to hold back until we need it. If tsdb's `_id` field mapper
changes enough to cause trouble for `Engine`.
final Field uidField = new Field(
"_id",
id,
randomBoolean() ? ProvidedIdFieldMapper.Defaults.FIELD_TYPE : TsidExtractingIdFieldMapper.FIELD_TYPE
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking I should pick this up front rather than per document....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do that now.

@nik9000
Copy link
Member Author

nik9000 commented Mar 18, 2022

run
elasticsearch-ci/part-1

@nik9000
Copy link
Member Author

nik9000 commented Mar 18, 2022

run elasticsearch-ci/part-1

@nik9000
Copy link
Member Author

nik9000 commented Mar 18, 2022

Well, this grew larger than I'd hoped. But it's still smaller than it'd be if we needed to use the whole parsing infrastructure. I'd like to try this for now and bite the bullet on the parsing infrastructure only if we need it. This should be enough to detect if the field changes in an incompatible way.

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I wonder if it will eventually bite us that the _ids do not conform to the field mapper. But we can tackle that when we have to.

@nik9000
Copy link
Member Author

nik9000 commented Mar 21, 2022

I wonder if it will eventually bite us that the _ids do not conform to the field mapper. But we can tackle that when we have to.

I'm reasonably sure we'll have to, yeah. But this'll catch those cases at least. Which'll be better than flying blind until then.

@nik9000 nik9000 merged commit 9fe31df into elastic:master Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:StorageEngine/TSDB You know, for Metrics Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants