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
Iterate keys instead of fetching #673
Conversation
Staging instance deployed by Travis CI! |
Staging instance deployed by Travis CI! |
shared/datastore.go
Outdated
} else if err != nil { | ||
return result, err | ||
} | ||
if (limit == nil || *limit > len(keys)) && len(keys) < MaxCountMaxValue { |
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.
We should add an else
branch for this if
and break the loop there to prevent unnecessary full table scan.
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.
Done (and other simplification).
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.
LGTM % a nit
shared/datastore.go
Outdated
@@ -79,16 +79,12 @@ func LoadTestRunKeys( | |||
break | |||
} else if err != nil { | |||
return result, err | |||
} else if (limit != nil && *limit <= len(keys)) || len(keys) >= MaxCountMaxValue { |
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.
Nit: can we make the two inequalities of the same direction?
Description
Re-fixes ##587 without fixed-limiting the key count.
Fixes #671
Fixes #569 and might help #570 too...
Review Information
/api/runs?product=chrome-68