From cc9e5ce45b36c8ab602dec2e5541e9295642f9d6 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 7 Apr 2025 14:09:49 -0400 Subject: [PATCH] reactor: change state key for max load keys Updates the key that's used within materialization state to track the max key that's been observed. We had temporarily disabled the load key optimizations as part of the 0325 indcident recovery, and this effectively makes that disablement permanent for existing tasks, while allowing it to be used for any newly created tasks. --- crates/runtime/src/materialize/protocol.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/runtime/src/materialize/protocol.rs b/crates/runtime/src/materialize/protocol.rs index aa5e2fd24b..79ea594a5a 100644 --- a/crates/runtime/src/materialize/protocol.rs +++ b/crates/runtime/src/materialize/protocol.rs @@ -586,5 +586,10 @@ pub async fn recv_connector_started_commit( } fn max_key_key(binding: &Binding) -> String { - format!("MK:{}", &binding.state_key) + // Key name changed in order to effectively disable the load optimization + // for all existing materializations, while preserving it for any new ones. + // The optimization was temporarily disabled as part of the 0325 incident + // recovery, and this effectively makes that permanent, while allowing it to + // be used on new tasks. + format!("MK-v2:{}", &binding.state_key) }