-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Fail shards early when we can detect a type missmatch #79869
Merged
not-napoleon
merged 12 commits into
elastic:master
from
not-napoleon:72276-fail-shard-on-valuetype-missmatch
Nov 29, 2021
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
47119d8
Lots of tests!
not-napoleon 7e374a3
slightly cleaner script compile injection
not-napoleon 887bdc1
more VSC resolve tests
not-napoleon 64d82ea
javadoc
not-napoleon 4a0d8e6
Move value type/field conflict detection earlier in the process
not-napoleon 77d621d
formatting fix
not-napoleon af886a1
Merge branch 'master' into 72276-fail-shard-on-valuetype-missmatch
not-napoleon 04fcb13
formatting fix
not-napoleon 179fcbe
Merge branch 'master' into 72276-fail-shard-on-valuetype-missmatch
not-napoleon 3739806
fix skip version
not-napoleon 08f61ac
Merge branch 'master' into 72276-fail-shard-on-valuetype-missmatch
not-napoleon 345b24a
add another test, this time with docs
not-napoleon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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 is a special case of the problem, because
valuetype_test_1
contains no documents. Wouldn't it be ok to silently skip its shards instead of failing them?Also, would it make sense to add a test where the index may contain documents?
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.
So, there are two problems with silently skipping shards that don't have docs that I can think of. First, we don't know that until later in the process, and by that time we don't have an obvious way to check if we have a conflict. So we'd need to carry some "has type conflict" flag and fail if that's true and we have docs. Seems clunky. It also adds some leniency and unpredictability. If the query changes to include docs on those shards, now the aggregation starts failing. Seems confusing.
Furthermore, if there are no matching docs on the shard, failing it doesn't change the results. It just lets the user know there's a potential problem. More information is better.
And, finally, yes, it makes sense to add a test with docs in both indices. Will push one up shortly. Thanks!