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

Side by Side Diff: appengine/logdog/coordinator/backend/doc.go

Issue 1910633006: LogDog: Support per-namespace expired archival. (Closed) Base URL: https://github.com/luci/luci-go@logdog-coordinator-svcdec
Patch Set: Update another test. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Package backend implements the set of backend handlers used by the LogDog
6 // Coordiantor. This consists of both cron handlers and work handlers. The
7 // cron handlers will dispatch task queue tasks that will be serviced by the
8 // work handlers.
9 //
10 // The backend interfaces between the two log storage spaces that LogDog uses:
11 // - Intermediate storage: Logs are accumulated here from the Transport by the
12 // Collector. They reside here until they are either complete or they
13 // timeout, at which point they are moved (via archival) to the archive
14 // storage.
15 // - Archive storage: Logs are moved from intermediate storage to archive
16 // storage upon completion. An index and associated data is generated for the
17 // stream and it is considered finalized and immutable. This should be a
18 // cheaper storage location, possibly with cold storage capabilities.
19 //
20 // Archival
21 //
22 // Archival begins with a periodic cron job that scans through LogStream
23 // datastore entries looking for streams that have not yet been archived. A
24 // given stream will have archival initiated if:
25 // - It has been closed for the configured `archive_delay` period.
26 // - It has not been archived for at least `archive_max_delay`.
27 //
28 // In the first case, we scan for logs that have been terminated and dispatch
29 // archival tasks requesting complete archival. This is the standard case,
30 // and will identify log streams that have had their terminal indexes
31 // registered.
32 //
33 // The second case is the failsafe case. If a log stream has been inactive for
34 // sufficiently long enough without actually being terminal, we preempt it and
35 // assume that something weng wrong in transit, dropping the terminal log entry.
36 //
37 // The archive cron job will dispatch an archive request to the archive backend
38 // handler for each log stream that matches one of these situations.
39 //
40 // Each archival task will look at the last time the LogStream has been updated.
41 // If this does not exceed our `archive_max_delay` (standard case), we will only
42 // complete archival if every LogEntry between [0..terminalIndex] is
43 // successfully archived. If we are past `archive_max_delay` (failsafe), we will
44 // do a best-effort sparse archival with whatever data is available.
45 package backend
OLDNEW
« no previous file with comments | « appengine/logdog/coordinator/backend/backend.go ('k') | appengine/logdog/coordinator/backend/util.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698