-
Notifications
You must be signed in to change notification settings - Fork 46
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
fix(lily): Consider partially completed heights w ERRORs and SKIPs #791
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
63a5d56
fix(gapfind): Find considers partially completed heights w ERRORs
placer14 4259c74
fix(gapfind): Find will ignore SKIPs which also have OKs
placer14 0c44a54
fix(find): Find recognizes all heights w ERRORs as gaps
placer14 33d3e39
chore(find): Simplify query, document, and remove redundancy
placer14 399f5e8
chore: gofmt and sql bug fix
placer14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,31 +213,41 @@ func (g *GapIndexer) findTaskEpochGaps(ctx context.Context) (visor.GapReportList | |
&result, | ||
` | ||
select height, task | ||
from ( | ||
select distinct vpr.task, vpr.height, vpr.status_information | ||
from visor_processing_reports vpr | ||
right join( | ||
select height | ||
from ( | ||
select task_height_count.height, count(task_height_count.height) cheight | ||
from ( | ||
select distinct(task) as task, height | ||
from visor_processing_reports | ||
group by height, task | ||
order by height desc | ||
) task_height_count | ||
group by task_height_count.height | ||
) task_count_per_height | ||
where task_count_per_height.cheight != ? | ||
) incomplete | ||
on vpr.height = incomplete.height | ||
where vpr.status_information != ? | ||
or vpr.status_information is null | ||
) incomplete_heights_and_their_completed_tasks | ||
where height >= ? and height <= ? | ||
from ( | ||
select distinct vpr.task, vpr.height | ||
from visor_processing_reports vpr | ||
right join( | ||
select height, cheight | ||
from ( | ||
select task_height_count.height, status, count(task_height_count.height) cheight | ||
from ( | ||
select task, height, status | ||
from visor_processing_reports | ||
where height >= ?2 and height <= ?3 | ||
group by height, task, status | ||
order by height desc, task | ||
) task_height_count | ||
where status = ?5 | ||
group by task_height_count.height, task_height_count.status | ||
) task_count_per_height | ||
where task_count_per_height.cheight != ?0 | ||
and status = ?5 | ||
) incomplete | ||
on vpr.height = incomplete.height | ||
where (vpr.status_information != ?1 | ||
or vpr.status_information is null) | ||
and vpr.status = ?5 | ||
and vpr.height >= ?2 and vpr.height <= ?3 | ||
) incomplete_heights_and_their_completed_tasks | ||
order by height desc | ||
; | ||
`, | ||
len(AllTasks), visor.ProcessingStatusInformationNullRound, g.minHeight, g.maxHeight, | ||
len(AllTasks), // arg 0 | ||
visor.ProcessingStatusInformationNullRound, // arg 1 | ||
g.minHeight, // arg 2 | ||
g.maxHeight, // arg 3 | ||
visor.ProcessingStatusError, // arg 4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Marks errors as gaps? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added notes within the query to explain what's happening here. |
||
visor.ProcessingStatusOK, //arg 5 | ||
) | ||
if err != nil { | ||
return nil, err | ||
|
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
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.
fixes #773?
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.
Correct.
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've added notes within the query to explain what's happening here.