Skip to content

Commit 05915ff

Browse files
committed
Lint fixes
1 parent 129085d commit 05915ff

4 files changed

Lines changed: 24 additions & 19 deletions

File tree

misc/python/materialize/mzcompose/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,12 @@ def get_variable_system_parameters(
392392
VariableSystemParameter(
393393
"persist_state_update_lease_timeout", "1s", ["0s", "1s", "10s"]
394394
),
395+
VariableSystemParameter(
396+
"arrangement_size_collection_interval", "1h", ["1s", "10s", "1h"]
397+
),
398+
VariableSystemParameter(
399+
"arrangement_size_retention_period", "7d", ["1m", "1h", "7d"]
400+
),
395401
VariableSystemParameter(
396402
"persist_validate_part_bounds_on_read", "false", ["true", "false"]
397403
),

misc/python/materialize/parallel_workload/action.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,16 @@ def __init__(
15331533
"'1s'",
15341534
"'10s'",
15351535
]
1536+
self.flags_with_values["arrangement_size_collection_interval"] = [
1537+
"'1s'",
1538+
"'10s'",
1539+
"'1h'",
1540+
]
1541+
self.flags_with_values["arrangement_size_retention_period"] = [
1542+
"'1m'",
1543+
"'1h'",
1544+
"'7d'",
1545+
]
15361546
# Note: it's not safe to re-enable this flag after writing with `persist_validate_part_bounds_on_write`,
15371547
# since those new-style parts may fail our old-style validation.
15381548
self.flags_with_values["persist_validate_part_bounds_on_read"] = ["FALSE"]

src/adapter/src/coord.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4279,11 +4279,8 @@ impl Coordinator {
42794279
differential_dataflow::consolidation::consolidate(&mut current_contents);
42804280

42814281
let cutoff_ts = u128::from(read_ts).saturating_sub(retention_period.as_millis());
4282-
let expired = arrangement_sizes_expired_retractions(
4283-
current_contents,
4284-
cutoff_ts,
4285-
item_id,
4286-
);
4282+
let expired =
4283+
arrangement_sizes_expired_retractions(current_contents, cutoff_ts, item_id);
42874284

42884285
// TODO(arrangement-sizes): when the writeable-catalog-server
42894286
// plumbing in https://github.com/MaterializeInc/materialize/pull/35436

src/adapter/src/coord/message_handler.rs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use maplit::btreemap;
1818
use mz_catalog::memory::objects::ClusterReplicaProcessStatus;
1919
use mz_controller::ControllerResponse;
2020
use mz_controller::clusters::{ClusterEvent, ClusterStatus};
21-
use mz_ore::instrument;
2221
use mz_ore::cast::CastFrom;
22+
use mz_ore::instrument;
2323
use mz_ore::now::EpochMillis;
2424
use mz_ore::option::OptionExt;
2525
use mz_ore::tracing::OpenTelemetryContext;
@@ -429,11 +429,9 @@ impl Coordinator {
429429
.arrangement_sizes_collection_time_seconds
430430
.start_timer();
431431

432-
let live_item_id = self
433-
.catalog()
434-
.resolve_builtin_storage_collection(
435-
&mz_catalog::builtin::MZ_OBJECT_ARRANGEMENT_SIZES_UNIFIED,
436-
);
432+
let live_item_id = self.catalog().resolve_builtin_storage_collection(
433+
&mz_catalog::builtin::MZ_OBJECT_ARRANGEMENT_SIZES_UNIFIED,
434+
);
437435
let live_global_id = self.catalog.get_entry(&live_item_id).latest_global_id();
438436
let history_item_id = self
439437
.catalog()
@@ -1117,10 +1115,7 @@ mod arrangement_sizes_hydration_tests {
11171115

11181116
#[mz_ore::test]
11191117
fn all_non_null_is_hydrated() {
1120-
let rows = vec![
1121-
(hydration_row(Some(100)), 1),
1122-
(hydration_row(Some(200)), 1),
1123-
];
1118+
let rows = vec![(hydration_row(Some(100)), 1), (hydration_row(Some(200)), 1)];
11241119
assert!(arrangement_sizes_all_hydrated(&rows));
11251120
}
11261121

@@ -1138,10 +1133,7 @@ mod arrangement_sizes_hydration_tests {
11381133
fn retractions_are_ignored() {
11391134
// A -1 row represents stale state that consolidation would remove.
11401135
// We skip it so a retracted null doesn't veto hydration.
1141-
let rows = vec![
1142-
(hydration_row(None), -1),
1143-
(hydration_row(Some(100)), 1),
1144-
];
1136+
let rows = vec![(hydration_row(None), -1), (hydration_row(Some(100)), 1)];
11451137
assert!(arrangement_sizes_all_hydrated(&rows));
11461138
}
11471139

0 commit comments

Comments
 (0)