Skip to content

Commit ccc52f0

Browse files
committed
Add ability to hold entries back from sequencing to reduce partial tiles
Add parameter specifying the maximum number of times a pending entry might be held back to prefer creating full tiles instead of partial tiles. fixes #33 This change required moving the logic to load the SequenceState from the sequence_entries function to the wrapping sequence function, and updating tests accordingly.
1 parent f9cc093 commit ccc52f0

File tree

6 files changed

+172
-53
lines changed

6 files changed

+172
-53
lines changed

crates/ct_worker/config.schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,16 @@
6464
"type": "string",
6565
"description": "Provide a hint to place the log in a specific geographic location. See https://developers.cloudflare.com/durable-objects/reference/data-location/ for supported locations. If unspecified, the Durable Object will be created in proximity to the first request."
6666
},
67-
"sequence_interval": {
67+
"sequence_interval_seconds": {
6868
"type": "integer",
6969
"minimum": 1,
7070
"default": 1,
7171
"description": "The duration in between sequencing operations, in seconds."
72+
},
73+
"max_pending_entry_holds": {
74+
"type": "integer",
75+
"default": 1,
76+
"description": "The maximum number of times a pending entry can be held back from sequencing to avoid creating partial tiles. If non-zero, pending entries may be delayed by a multiple of sequence interval."
7277
}
7378
},
7479
"required": [

crates/ct_worker/config/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@ pub struct LogParams {
2828
pub temporal_interval: TemporalInterval,
2929
pub location_hint: Option<String>,
3030
#[serde(default = "default_sequence_interval_seconds")]
31-
pub sequence_interval: u64,
31+
pub sequence_interval_seconds: u64,
32+
#[serde(default = "default_max_pending_entry_holds")]
33+
pub max_pending_entry_holds: usize,
3234
}
3335

3436
fn default_sequence_interval_seconds() -> u64 {
3537
1
3638
}
39+
40+
fn default_max_pending_entry_holds() -> usize {
41+
1
42+
}

0 commit comments

Comments
 (0)