TextFieldMapperTests use synthetic id randomly#143069
Merged
burqen merged 1 commit intoelastic:mainfrom Feb 26, 2026
Merged
Conversation
When running with synthetic id we would calculate routing from id. This would hit the assertion in TsidExtractingIdFieldMapper .extractRoutingHashFromSyntheticId because the dummy id value is too short. Since it's not the intention of the test to exercise that code path we simply set routing explicitly instead. The alternative would have been to compute a valid synthetic id and that's too much work.
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
tlrx
approved these changes
Feb 26, 2026
Member
tlrx
left a comment
There was a problem hiding this comment.
LGTM - Just to be sure I understand, this is preparatory work for enabling synthetic id by default right? If so, maybe the description should mention it.
Contributor
Author
Yes, good point. I've added it to the description. |
PeteGillinElastic
pushed a commit
to PeteGillinElastic/elasticsearch
that referenced
this pull request
Feb 27, 2026
When running with synthetic id we would calculate routing from id. This would hit the assertion in TsidExtractingIdFieldMapper .extractRoutingHashFromSyntheticId because the dummy id value is too short. Since it's not the intention of the test to exercise that code path we simply set routing explicitly instead. The alternative would have been to compute a valid synthetic id and that's too much work.
16 tasks
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.
When running with synthetic id we would calculate routing from id. This would hit the assertion in TsidExtractingIdFieldMapper .extractRoutingHashFromSyntheticId because the dummy id value is too short. Since it's not the intention of the test to exercise that code path we simply set routing explicitly instead. The alternative would have been to compute a valid synthetic id and that's too much work.
This is preparation for enabling synthetic id by default #142366