-
Notifications
You must be signed in to change notification settings - Fork 25.6k
TSDB: routingPath object type check improvement #83310
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
TSDB: routingPath object type check improvement #83310
Conversation
|
Pinging @elastic/es-analytics-geo (Team:Analytics) |
|
@elasticmachine, test this please. I'll be this is going to cause "fun" with #83148. |
|
@elasticmachine, update branch |
|
@elasticmachine update branch |
|
@elasticmachine, test this please |
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/tsdb/20_mapping.yml
Outdated
Show resolved
Hide resolved
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 haven't quite understood all of the implications here. Right now the checks in DocumentMapper match more fields than the IndexRouting code matches which feels safe. It might reject mappings that are technically valid, I mean. But with this change I'm not 100% sure it does that. It probably does. I just haven't quite figured it out yet.
|
@weizijun, I am not quite sure I understand why you singled out |
|
@imotov @nik9000 , the PR is to solve the problem that object type will throw exception. e.g Now, the index.routingPath configure with
|
In the case, it will throw exception, and index.routing_path= After the PR, index.routing_path= |
Why do you think it is ok to throw exception in this case and not throw an exception in the other? To me these are the same use case. If we want to solve one of them - let's solve all of them. I don't really see the difference between leading and trailing |
|
@elasticmachine update branch |
|
@elasticmachine test this please |
|
@elasticmachine, test this please |
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 it looks reasonable now. @nik9000 WDYT?
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.
Sure.
@elasticmachine test this please
|
Ah! It already has. |
|
Merged. Thanks @weizijun ! |
About TSDB index.routing_path setting improvement in #82511
The Point 1 and 3 is doing improvement by Nik.
This PR is about the point 2 improvement.
As Nik strongly recommends rejecting the matching object in the routing generation code. I do a little improvement.
Object type is rejected when the routing_path patten is equals the object name. e.g:
routingPath=foo*is ok, butroutingPath=foois not ok.