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

Issue 1863973002: LogDog: Update to archival V2. (Closed)

Created:
4 years, 8 months ago by dnj
Modified:
4 years, 8 months ago
Reviewers:
Vadim Sh., estaab, iannucci
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, andrew.wang, todd, tandrii+luci-go_chromium.org, M-A Ruel
Base URL:
https://github.com/luci/luci-go@grpcutil-errors
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

LogDog: Update to archival V2. Remove archive task polling. The standard path to archival will be archive tasks created when the stream is registered as terminated. These tasks will stick around until the archival is successful or has been declared a failure. Archival completeness is now a property of its task: if the task is older than a threshold, the archive's completeness requirement will be dropped. Archival also offers an error path which will archive an empty stream if there is a fatal (non-transient) archival error. This primarily targets data errors. An emergency poller will still run periodically to catch streams that have not been terminated, either because of data loss or because the Butler never sent a terminal index (i.e., it crashed). We also switch from pull queues (alpha REST API) to Pub/Sub for archival tasking. A unique key is sent with each Pub/Sub task to recreate transactional task queue operations in Pub/Sub - only the Pub/Sub message that includes the key transactionally encoded into Datastore will be used for archival. Coordinator: - Add schema field to datastore, add migration path from no-schema. - Move log stream validation to Load/Save, remove special handlers. - Remove archival polling. Set up emergency archive poller instead. - Archive tasking will happen once, either on termination or on expired stream polling, and will be recorded in the stream's state. - Clean up some tests to accommodate the changes. Archivist: - ONLY clear archive task when acknowledged by the Coordinator, since it will not be recreated. - Archival tasks will now note the age when incomplete archival is permitted. Collector: - Add a "don't waste your time" quick path to discard a log bundle. Committed: https://github.com/luci/luci-go/commit/c3ca643d9c02f0a7684e73e9aeae77206ca88533

Patch Set 1 #

Patch Set 2 : Minor fixes, works in dev now. #

Total comments: 16

Patch Set 3 : Code review comments, use Pub/Sub, archival staging, quality of life. #

Total comments: 23

Patch Set 4 : Fix proto comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4857 lines, -3578 lines) Patch
M appengine/cmd/logdog_coordinator/vmuser/cron.yaml View 1 1 chunk +3 lines, -8 lines 0 comments Download
M appengine/cmd/logdog_coordinator/vmuser/index.yaml View 2 chunks +2 lines, -1 line 0 comments Download
M appengine/cmd/logdog_coordinator/vmuser/main.go View 1 2 1 chunk +8 lines, -2 lines 0 comments Download
M appengine/cmd/logdog_coordinator/vmuser/queue.yaml View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
A appengine/logdog/coordinator/archival.go View 1 2 1 chunk +88 lines, -0 lines 0 comments Download
A appengine/logdog/coordinator/archivalPublisher.go View 1 2 3 1 chunk +56 lines, -0 lines 0 comments Download
A + appengine/logdog/coordinator/auth.go View 1 2 2 chunks +7 lines, -7 lines 0 comments Download
M appengine/logdog/coordinator/backend/archiveCron.go View 1 2 1 chunk +108 lines, -176 lines 0 comments Download
M appengine/logdog/coordinator/backend/archiveCron_test.go View 1 2 4 chunks +101 lines, -144 lines 0 comments Download
M appengine/logdog/coordinator/backend/backend.go View 1 2 2 chunks +4 lines, -6 lines 0 comments Download
M appengine/logdog/coordinator/backend/util.go View 2 chunks +0 lines, -39 lines 0 comments Download
M appengine/logdog/coordinator/backend/util_test.go View 2 chunks +0 lines, -27 lines 0 comments Download
D appengine/logdog/coordinator/config/auth.go View 1 2 1 chunk +0 lines, -89 lines 0 comments Download
D appengine/logdog/coordinator/config/bigTable.go View 1 2 1 chunk +0 lines, -96 lines 0 comments Download
M appengine/logdog/coordinator/config/config.go View 1 2 2 chunks +16 lines, -27 lines 0 comments Download
A appengine/logdog/coordinator/coordinatorTest/archival.go View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
D appengine/logdog/coordinator/coordinatorTest/config.go View 1 2 1 chunk +0 lines, -40 lines 0 comments Download
M appengine/logdog/coordinator/coordinatorTest/logStream.go View 1 chunk +0 lines, -1 line 0 comments Download
A appengine/logdog/coordinator/coordinatorTest/service.go View 1 2 1 chunk +90 lines, -0 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/admin/service.go View 1 2 1 chunk +37 lines, -1 line 0 comments Download
M appengine/logdog/coordinator/endpoints/admin/setConfig.go View 1 2 2 chunks +3 lines, -21 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/logs/get.go View 1 2 6 chunks +8 lines, -6 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/logs/get_test.go View 1 2 10 chunks +39 lines, -38 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/logs/list.go View 1 2 3 chunks +2 lines, -2 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/logs/list_test.go View 1 2 2 chunks +7 lines, -5 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/logs/query.go View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/logs/query_test.go View 1 2 7 chunks +19 lines, -9 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/logs/service.go View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/logs/util.go View 1 chunk +6 lines, -5 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/archiveStream.go View 1 2 4 chunks +57 lines, -24 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/archiveStream_test.go View 1 2 4 chunks +74 lines, -11 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/getConfig.go View 1 2 3 chunks +7 lines, -7 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/getConfig_test.go View 1 2 3 chunks +12 lines, -18 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/loadStream.go View 1 2 3 2 chunks +17 lines, -2 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/loadStream_test.go View 1 2 3 chunks +33 lines, -8 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/registerStream.go View 1 2 2 chunks +6 lines, -8 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/registerStream_test.go View 1 2 2 chunks +9 lines, -5 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/service.go View 1 2 2 chunks +13 lines, -11 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/service_test.go View 1 2 3 chunks +15 lines, -9 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/terminateStream.go View 1 2 4 chunks +78 lines, -75 lines 0 comments Download
M appengine/logdog/coordinator/endpoints/services/terminateStream_test.go View 1 2 6 chunks +43 lines, -15 lines 0 comments Download
M appengine/logdog/coordinator/logStream.go View 1 2 13 chunks +155 lines, -82 lines 0 comments Download
A appengine/logdog/coordinator/logStream_migrate.go View 1 2 1 chunk +81 lines, -0 lines 0 comments Download
M appengine/logdog/coordinator/logStream_test.go View 1 2 4 chunks +144 lines, -116 lines 0 comments Download
M appengine/logdog/coordinator/service.go View 1 2 2 chunks +185 lines, -33 lines 0 comments Download
M common/api/logdog_coordinator/logs/v1/pb.discovery.go View 2 chunks +938 lines, -938 lines 0 comments Download
M common/api/logdog_coordinator/logs/v1/state.proto View 2 chunks +7 lines, -6 lines 0 comments Download
M common/api/logdog_coordinator/logs/v1/state.pb.go View 4 chunks +27 lines, -33 lines 0 comments Download
M common/api/logdog_coordinator/services/v1/pb.discovery.go View 1 2 3 1 chunk +790 lines, -740 lines 0 comments Download
M common/api/logdog_coordinator/services/v1/service.proto View 1 2 3 3 chunks +16 lines, -3 lines 0 comments Download
M common/api/logdog_coordinator/services/v1/service.pb.go View 1 2 3 5 chunks +64 lines, -41 lines 0 comments Download
M common/api/logdog_coordinator/services/v1/state.proto View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M common/api/logdog_coordinator/services/v1/state.pb.go View 1 2 2 chunks +13 lines, -15 lines 0 comments Download
M common/api/logdog_coordinator/services/v1/tasks.proto View 1 2 1 chunk +20 lines, -2 lines 0 comments Download
M common/api/logdog_coordinator/services/v1/tasks.pb.go View 1 2 3 chunks +43 lines, -9 lines 0 comments Download
A common/api/logdog_coordinator/services/v1/util.go View 1 chunk +18 lines, -0 lines 0 comments Download
M common/errors/multierror.go View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M common/errors/multierror_test.go View 1 2 2 chunks +21 lines, -0 lines 0 comments Download
M common/gcloud/gs/gs.go View 1 2 5 chunks +122 lines, -21 lines 0 comments Download
M common/gcloud/gs/path.go View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M common/gcloud/pubsub/quota.go View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M common/logdog/coordinator/query_test.go View 2 chunks +0 lines, -2 lines 0 comments Download
M common/logdog/coordinator/stream.go View 1 chunk +0 lines, -1 line 0 comments Download
M common/logdog/coordinator/stream_test.go View 9 chunks +0 lines, -9 lines 0 comments Download
M common/proto/logdog/svcconfig/config.proto View 1 2 2 chunks +34 lines, -24 lines 0 comments Download
M common/proto/logdog/svcconfig/config.pb.go View 1 2 4 chunks +72 lines, -64 lines 0 comments Download
M server/cmd/logdog_archivist/main.go View 1 2 3 3 chunks +132 lines, -57 lines 0 comments Download
A server/cmd/logdog_archivist/task.go View 1 2 3 1 chunk +78 lines, -0 lines 0 comments Download
M server/cmd/logdog_collector/main.go View 1 2 3 3 chunks +19 lines, -19 lines 0 comments Download
M server/internal/logdog/archivist/archivist.go View 1 2 3 4 chunks +382 lines, -281 lines 0 comments Download
M server/internal/logdog/archivist/archivist_test.go View 1 2 3 15 chunks +237 lines, -95 lines 0 comments Download
A server/internal/logdog/archivist/storageSource.go View 1 2 1 chunk +125 lines, -0 lines 0 comments Download
M server/internal/logdog/collector/collector.go View 1 chunk +11 lines, -0 lines 0 comments Download
M server/internal/logdog/service/service.go View 1 2 3 3 chunks +24 lines, -0 lines 0 comments Download
M server/logdog/archive/archive.go View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M server/logdog/storage/archive/storage.go View 1 2 7 chunks +14 lines, -24 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
dnj
PTAL vadimsh@, this is a replacement for the previous "retry failure" CL that you reviewer. ...
4 years, 8 months ago (2016-04-06 17:21:11 UTC) #2
Vadim Sh.
I'll review that since I have a bit of time now.
4 years, 8 months ago (2016-04-07 00:37:30 UTC) #3
dnj
On 2016/04/07 00:37:30, Vadim Sh. wrote: > I'll review that since I have a bit ...
4 years, 8 months ago (2016-04-07 00:45:35 UTC) #4
Vadim Sh.
https://codereview.chromium.org/1863973002/diff/20001/appengine/logdog/coordinator/backend/archiveCron.go File appengine/logdog/coordinator/backend/archiveCron.go (right): https://codereview.chromium.org/1863973002/diff/20001/appengine/logdog/coordinator/backend/archiveCron.go#newcode100 appengine/logdog/coordinator/backend/archiveCron.go:100: createdTask, err := params.CreateTask(tq.Get(c), ls, ccfg.ArchiveTaskQueue) nit: you can ...
4 years, 8 months ago (2016-04-07 01:21:32 UTC) #5
dnj
Responded to comments, thanks a lot, vadimsh@! I have uploaded another large change. It builds ...
4 years, 8 months ago (2016-04-11 17:20:05 UTC) #7
iannucci
lgtm https://chromiumcodereview.appspot.com/1863973002/diff/40001/appengine/logdog/coordinator/archivalPublisher.go File appengine/logdog/coordinator/archivalPublisher.go (right): https://chromiumcodereview.appspot.com/1863973002/diff/40001/appengine/logdog/coordinator/archivalPublisher.go#newcode19 appengine/logdog/coordinator/archivalPublisher.go:19: type ArchivalPublisher interface { On 2016/04/11 17:20:04, dnj ...
4 years, 8 months ago (2016-04-19 00:55:28 UTC) #8
dnj
Thanks for reviewing! https://chromiumcodereview.appspot.com/1863973002/diff/40001/appengine/logdog/coordinator/archivalPublisher.go File appengine/logdog/coordinator/archivalPublisher.go (right): https://chromiumcodereview.appspot.com/1863973002/diff/40001/appengine/logdog/coordinator/archivalPublisher.go#newcode19 appengine/logdog/coordinator/archivalPublisher.go:19: type ArchivalPublisher interface { On 2016/04/19 ...
4 years, 8 months ago (2016-04-20 18:15:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1863973002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1863973002/60001
4 years, 8 months ago (2016-04-20 18:16:06 UTC) #12
commit-bot: I haz the power
Failed to request the patch to try. Please note that binary files are still unsupported ...
4 years, 8 months ago (2016-04-20 18:28:19 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1863973002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1863973002/60001
4 years, 8 months ago (2016-04-20 18:28:51 UTC) #16
commit-bot: I haz the power
4 years, 8 months ago (2016-04-20 18:40:41 UTC) #18
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://github.com/luci/luci-go/commit/c3ca643d9c02f0a7684e73e9aeae77206ca88533

Powered by Google App Engine
This is Rietveld 408576698