| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto3"; | 5 syntax = "proto3"; |
| 6 | 6 |
| 7 package logdog; | 7 package logdog; |
| 8 | 8 |
| 9 import "google/protobuf/duration.proto"; | 9 import "google/protobuf/duration.proto"; |
| 10 import "google/protobuf/timestamp.proto"; | 10 import "google/protobuf/timestamp.proto"; |
| 11 | 11 |
| 12 // ArchiveDispatchTask is an internal task used by the Coordinator to schedule |
| 13 // an archival dispatch. |
| 14 message ArchiveDispatchTask { |
| 15 // The hash ID for the log stream to archive. |
| 16 string id = 1; |
| 17 |
| 18 // The type of archival task. |
| 19 enum Tag { |
| 20 TERMINATED = 0; |
| 21 EXPIRED = 1; |
| 22 } |
| 23 Tag tag = 2; |
| 24 |
| 25 // Don't waste time archiving the log stream until it is at least this old. |
| 26 // |
| 27 // This is in place to prevent overly-aggressive archivals from wasting time |
| 28 // trying, then failing, becuase the log stream data is still being collected |
| 29 // into intermediate storage. |
| 30 google.protobuf.Duration settle_delay = 3; |
| 31 |
| 32 // The amount of time after the task was created that log stream completeness |
| 33 // will be used as a success criteria. If the task's age is older than this |
| 34 // value, completeness will not be enforced. |
| 35 // |
| 36 // The task's age can be calculated by subtracting its lease expiration time |
| 37 // (leaseTimestamp) from its enqueued timestamp (enqueueTimestamp). |
| 38 google.protobuf.Duration complete_period = 4; |
| 39 } |
| 40 |
| 12 // ArchiveTask is a task queue task description for the archival of a single | 41 // ArchiveTask is a task queue task description for the archival of a single |
| 13 // log stream. | 42 // log stream. |
| 14 message ArchiveTask { | 43 message ArchiveTask { |
| 15 // The name of the project that this stream is bound to. | 44 // The name of the project that this stream is bound to. |
| 16 string project = 1; | 45 string project = 1; |
| 17 // The hash ID of the log stream to archive. | 46 // The hash ID of the log stream to archive. |
| 18 string id = 2; | 47 string id = 2; |
| 19 | 48 |
| 20 // The archival key of the log stream. If this key doesn't match the key in | 49 // The archival key of the log stream. If this key doesn't match the key in |
| 21 // the log stream state, the request is superfluous and should be deleted. | 50 // the log stream state, the request is superfluous and should be deleted. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 41 // This time is optional, and will be based on the Coordinator's clock. If not | 70 // This time is optional, and will be based on the Coordinator's clock. If not |
| 42 // zero, it can be used by the Archivist to avoid superfluous archival | 71 // zero, it can be used by the Archivist to avoid superfluous archival |
| 43 // processing by asserting that IF this time is close to the Archivist's local | 72 // processing by asserting that IF this time is close to the Archivist's local |
| 44 // clock by a specific threshold, it will punt the archival task. | 73 // clock by a specific threshold, it will punt the archival task. |
| 45 // | 74 // |
| 46 // Because archival is dispatched by Tumble, the actual encoding of archival | 75 // Because archival is dispatched by Tumble, the actual encoding of archival |
| 47 // parameters is oftentimes delayed such that the request is dispatched to | 76 // parameters is oftentimes delayed such that the request is dispatched to |
| 48 // Pub/Sub before the datastore has been updated. | 77 // Pub/Sub before the datastore has been updated. |
| 49 google.protobuf.Timestamp dispatched_at = 6; | 78 google.protobuf.Timestamp dispatched_at = 6; |
| 50 } | 79 } |
| OLD | NEW |