Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Issue 2668763002: Use a datastore batcher for build queries. (Closed)

Created:
3 years, 10 months ago by dnj
Modified:
3 years, 10 months ago
Reviewers:
estaab, hinoka
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, maruel+w_chromium.org, tandrii+luci-go_chromium.org
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

Use a datastore batcher for build queries. Queries are timing out. This is because processing elements is CPU-intensive, and datastore queries have a maximum lifetime of 30 seconds. Use batching to break the single query/deserialize process into a series of consecutive queries so any individual query doesn't run into the timeout limit. Note that really high limits will still bump into the actual AppEngine request timeout. BUG=chromium:687236 TEST=None R=estaab@chromium.org, hinoka@chromium.org Review-Url: https://codereview.chromium.org/2668763002 Committed: https://github.com/luci/luci-go/commit/b7c33500af911388323e6e612e933ea0f7f57888

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -11 lines) Patch
M milo/appengine/buildbot/builder.go View 1 chunk +1 line, -1 line 0 comments Download
M milo/appengine/buildbot/console.go View 1 chunk +1 line, -1 line 0 comments Download
A milo/appengine/buildbot/datastore.go View 1 chunk +31 lines, -0 lines 2 comments Download
M milo/appengine/buildbot/grpc.go View 5 chunks +5 lines, -3 lines 0 comments Download
M milo/appengine/buildbot/master.go View 3 chunks +3 lines, -5 lines 0 comments Download
M milo/appengine/buildbot/pubsub.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (3 generated)
dnj
3 years, 10 months ago (2017-01-31 18:54:03 UTC) #1
hinoka
ah for some reason i thought datastore batched automatically like ndb did. this lgtm but ...
3 years, 10 months ago (2017-01-31 19:05:32 UTC) #2
estaab
Awesome! Seems like a straightforward improvement.
3 years, 10 months ago (2017-01-31 19:16:53 UTC) #3
estaab
lgtm
3 years, 10 months ago (2017-01-31 19:16:56 UTC) #4
dnj
https://codereview.chromium.org/2668763002/diff/1/milo/appengine/buildbot/datastore.go File milo/appengine/buildbot/datastore.go (right): https://codereview.chromium.org/2668763002/diff/1/milo/appengine/buildbot/datastore.go#newcode23 milo/appengine/buildbot/datastore.go:23: func getBuildQueryBatcher(c context.Context) *ds.Batcher { On 2017/01/31 19:05:32, hinoka ...
3 years, 10 months ago (2017-01-31 19:19:39 UTC) #5
dnj
On 2017/01/31 19:19:39, dnj wrote: > https://codereview.chromium.org/2668763002/diff/1/milo/appengine/buildbot/datastore.go > File milo/appengine/buildbot/datastore.go (right): > > https://codereview.chromium.org/2668763002/diff/1/milo/appengine/buildbot/datastore.go#newcode23 > ...
3 years, 10 months ago (2017-01-31 19:20:40 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2668763002/1
3 years, 10 months ago (2017-01-31 19:20:56 UTC) #8
hinoka
Makes sense, thanks for the explanation.
3 years, 10 months ago (2017-01-31 19:27:35 UTC) #9
commit-bot: I haz the power
3 years, 10 months ago (2017-01-31 19:27:58 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://github.com/luci/luci-go/commit/b7c33500af911388323e6e612e933ea0f7f57888

Powered by Google App Engine
This is Rietveld 408576698