Reporting regression: reports always retrying regardless of outcome#26995
Merged
joelgriffith merged 5 commits intoelastic:masterfrom Dec 12, 2018
joelgriffith:reporting/bugfix-reports-always-retrying
Merged
Reporting regression: reports always retrying regardless of outcome#26995joelgriffith merged 5 commits intoelastic:masterfrom joelgriffith:reporting/bugfix-reports-always-retrying
joelgriffith merged 5 commits intoelastic:masterfrom
joelgriffith:reporting/bugfix-reports-always-retrying
Conversation
tsullivan
reviewed
Dec 11, 2018
Member
There was a problem hiding this comment.
We want a query that's equivalent of
jobtype == this.jobtype &&
(status == "pending" ||
(status == "processing" && process_expiration <= nowTime))
I'd recommend trying to do this without using constant_score. Can we try:
{
query: {
bool: {
filter: {
bool: {
must: { term: { jobtype: this.jobtype } },
should: [
{ term: { status: 'pending' } },
{
bool: {
must: [
{ term: { status: 'processing' } },
{ range: { process_expiration: { lte: nowTime } } }
]
}
}
]
}
}
}
}
}
Contributor
Author
There was a problem hiding this comment.
Dope! I still needed the minimum_should_match: 1 in order for this to work, just an FYI
Member
There was a problem hiding this comment.
With further digging, I find that adding minimum_should_match: 1 was perhaps the only change needed.
Contributor
💔 Build Failed |
added 5 commits
December 11, 2018 14:58
Contributor
💚 Build Succeeded |
Member
|
I believe after this PR goes in, we can revert the changes to reporting tests in #26877 |
Member
|
I got word that the change in ES around this was elastic/elasticsearch#35354 |
Member
|
6.x/6.6.0: #27082 |
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.
Summary
I've been experiencing a recent regression, where, reports are continuously retrying regardless of status. Upon further investigation it appears that our queries for outstanding jobs were returning jobs of all statuses. This PR fixes the underlying issue (which appears to be that
shoulddoesn't necessarily need to match in order to return). I'm not sure why this wasn't an issue prior, perhaps a bugfix that landed in ES or its deps.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibility