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

Issue 2989333002: [logdog] Replace Tumble with push queues. (Closed)

Created:
3 years, 4 months ago by dnj
Modified:
3 years, 4 months ago
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

[logdog] Replace Tumble with push queues. Replace Tumble with push queues for archival. Currently, LogDog uses the Tumble journaling state machine to manage its archival. Tumble is generally overkill for this one-state task, but was chosen because it seemed, at the time, likely that it would be used everywhere in LUCI. Almost two years later, LogDog is the only production major user of Tumble. Since it barely scrapes the power of Tumble, and since Tumble itself is rather opaque in its operations, this trade-off is not worthwhile. Instead, we replace Tumble with task queues. When a log stream is registered, an "expired" task will be enqueued to handle it once the stream expires (if it never gets terminated). When the stream is terminated, the expiration task is deleted, replaced with a shorter-term archival task. We leave Tumble and its mutation handling in-place because, in production, there is still a Tumble backlog to process through. This should be empited within a few days, and we can finish the removal. BUG=chromium:751925 TEST=unit Review-Url: https://codereview.chromium.org/2989333002 Committed: https://github.com/luci/luci-go/commit/18ae6bdbc6652e10610d55e4528d4bb3c624f813

Patch Set 1 #

Total comments: 3

Patch Set 2 : switch to tq package #

Patch Set 3 : use name prefix instead of suffix #

Patch Set 4 : incorporate namespace in task name #

Total comments: 16

Patch Set 5 : use single publisher #

Patch Set 6 : named #

Patch Set 7 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1314 lines, -769 lines) Patch
A common/gcloud/pubsub/publisher.go View 1 2 3 4 1 chunk +80 lines, -0 lines 0 comments Download
M common/gcloud/pubsub/topic.go View 1 2 3 4 2 chunks +0 lines, -16 lines 0 comments Download
M logdog/api/endpoints/coordinator/services/v1/pb.discovery.go View 1 2 3 4 5 6 1 chunk +612 lines, -588 lines 0 comments Download
M logdog/api/endpoints/coordinator/services/v1/service.pb.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M logdog/api/endpoints/coordinator/services/v1/tasks.proto View 1 2 3 4 5 6 1 chunk +29 lines, -0 lines 0 comments Download
M logdog/api/endpoints/coordinator/services/v1/tasks.pb.go View 1 2 3 4 5 6 4 chunks +104 lines, -21 lines 0 comments Download
M logdog/appengine/cmd/coordinator/backend/main.go View 1 2 chunks +2 lines, -0 lines 0 comments Download
M logdog/appengine/cmd/coordinator/backend/module-backend.yaml View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M logdog/appengine/cmd/coordinator/services/main.go View 1 chunk +1 line, -0 lines 0 comments Download
M logdog/appengine/cmd/coordinator/services/module-services.yaml View 1 chunk +5 lines, -0 lines 0 comments Download
M logdog/appengine/cmd/coordinator/vmuser/app.yaml View 1 chunk +5 lines, -0 lines 0 comments Download
M logdog/appengine/cmd/coordinator/vmuser/queue.yaml View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M logdog/appengine/coordinator/archivalPublisher.go View 1 2 3 4 3 chunks +8 lines, -11 lines 0 comments Download
M logdog/appengine/coordinator/coordinatorTest/context.go View 1 5 chunks +27 lines, -28 lines 0 comments Download
A logdog/appengine/coordinator/coordinatorTest/taskqueue.go View 1 chunk +82 lines, -0 lines 0 comments Download
M logdog/appengine/coordinator/endpoints/services/registerStream.go View 1 5 chunks +42 lines, -37 lines 0 comments Download
M logdog/appengine/coordinator/endpoints/services/registerStream_test.go View 7 chunks +9 lines, -8 lines 0 comments Download
M logdog/appengine/coordinator/endpoints/services/terminateStream.go View 1 2 3 4 5 3 chunks +25 lines, -17 lines 0 comments Download
M logdog/appengine/coordinator/endpoints/services/terminateStream_test.go View 1 chunk +3 lines, -3 lines 0 comments Download
M logdog/appengine/coordinator/service.go View 1 2 3 4 4 chunks +24 lines, -38 lines 0 comments Download
A logdog/appengine/coordinator/tasks/archival.go View 1 2 3 4 5 6 1 chunk +201 lines, -0 lines 0 comments Download
A logdog/appengine/coordinator/tasks/routes.go View 1 1 chunk +41 lines, -0 lines 0 comments Download
M logdog/client/butler/output/logdog/output.go View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 23 (9 generated)
dnj
PTAL. This CL makes me sad, but I think it's good for the long-term health ...
3 years, 4 months ago (2017-08-03 03:45:55 UTC) #2
Vadim Sh.
(you may or may not be interested in this thing: https://godoc.org/github.com/luci/luci-go/scheduler/appengine/engine/tq It's like python defer'ed ...
3 years, 4 months ago (2017-08-03 06:10:16 UTC) #4
dnj
On 2017/08/03 06:10:16, Vadim Sh. wrote: > (you may or may not be interested in ...
3 years, 4 months ago (2017-08-03 15:43:22 UTC) #5
Ryan Tseng
I'll let robbie look at this since he's more familiar with this, unless he's super ...
3 years, 4 months ago (2017-08-03 17:30:23 UTC) #7
dnj
use name prefix instead of suffix
3 years, 4 months ago (2017-08-03 18:38:08 UTC) #8
dnj
incorporate namespace in task name
3 years, 4 months ago (2017-08-03 18:41:12 UTC) #9
Ryan Tseng
lgtm didn't have a whole lot of comments, make sure you validate on -dev first. ...
3 years, 4 months ago (2017-08-03 19:30:05 UTC) #10
iannucci
lgtm https://codereview.chromium.org/2989333002/diff/60001/logdog/api/endpoints/coordinator/services/v1/tasks.proto File logdog/api/endpoints/coordinator/services/v1/tasks.proto (right): https://codereview.chromium.org/2989333002/diff/60001/logdog/api/endpoints/coordinator/services/v1/tasks.proto#newcode15 logdog/api/endpoints/coordinator/services/v1/tasks.proto:15: // The hash ID fo the log stream ...
3 years, 4 months ago (2017-08-03 19:54:20 UTC) #11
dnj
use single publisher
3 years, 4 months ago (2017-08-03 20:08:14 UTC) #12
dnj
named
3 years, 4 months ago (2017-08-03 20:49:56 UTC) #13
dnj
https://codereview.chromium.org/2989333002/diff/60001/logdog/api/endpoints/coordinator/services/v1/tasks.proto File logdog/api/endpoints/coordinator/services/v1/tasks.proto (right): https://codereview.chromium.org/2989333002/diff/60001/logdog/api/endpoints/coordinator/services/v1/tasks.proto#newcode15 logdog/api/endpoints/coordinator/services/v1/tasks.proto:15: // The hash ID fo the log stream to ...
3 years, 4 months ago (2017-08-03 21:05:47 UTC) #14
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/2989333002/100001
3 years, 4 months ago (2017-08-03 21:06:14 UTC) #17
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/2989333002/110001
3 years, 4 months ago (2017-08-03 21:07:36 UTC) #20
commit-bot: I haz the power
3 years, 4 months ago (2017-08-03 21:14:28 UTC) #23
Message was sent while issue was closed.
Committed patchset #7 (id:110001) as
https://github.com/luci/luci-go/commit/18ae6bdbc6652e10610d55e4528d4bb3c624f813

Powered by Google App Engine
This is Rietveld 408576698