From 9aec274899fd29fa6b31bc45226351b634d11958 Mon Sep 17 00:00:00 2001 From: Dominik Werder Date: Thu, 17 Aug 2023 15:07:07 +0200 Subject: [PATCH] Remove old cache config option --- crates/disk/src/aggtest.rs | 1 - crates/disk/src/cache.rs | 7 +++---- crates/disk/src/gen.rs | 1 - crates/httpret/src/api4/eventdata.rs | 4 ---- crates/netpod/src/netpod.rs | 5 ----- crates/nodenet/src/conn/test.rs | 1 - 6 files changed, 3 insertions(+), 16 deletions(-) diff --git a/crates/disk/src/aggtest.rs b/crates/disk/src/aggtest.rs index 7fc1673..b0aeb66 100644 --- a/crates/disk/src/aggtest.rs +++ b/crates/disk/src/aggtest.rs @@ -24,7 +24,6 @@ pub fn make_test_node(id: u32) -> Node { port: 8800 + id as u16, port_raw: 8800 + id as u16 + 100, // TODO use a common function to supply the tmp path. - cache_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)), sf_databuffer: Some(SfDatabuffer { data_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)), ksprefix: "ks".into(), diff --git a/crates/disk/src/cache.rs b/crates/disk/src/cache.rs index c6dbbe5..6c55373 100644 --- a/crates/disk/src/cache.rs +++ b/crates/disk/src/cache.rs @@ -77,9 +77,7 @@ impl CacheFileDesc { pub fn path(&self, node_config: &NodeConfigCached) -> PathBuf { let hash = self.hash(); let hc = self.hash_channel(); - node_config - .node - .cache_base_path + PathBuf::from(format!("{}", err::todoval::())) .join("cache") .join(&hc[0..3]) .join(&hc[3..6]) @@ -175,7 +173,8 @@ pub async fn clear_cache_all(node_config: &NodeConfigCached, dry: bool) -> Resul } let mut dirs = VecDeque::new(); let mut stack = VecDeque::new(); - stack.push_front(node_config.node.cache_base_path.join("cache")); + // stack.push_front(node_config.node.cache_base_path.join("cache")); + stack.push_front(PathBuf::from("UNDEFINED/NOTHING/REMOVE/ME").join("cache")); loop { match stack.pop_front() { Some(path) => { diff --git a/crates/disk/src/gen.rs b/crates/disk/src/gen.rs index 3085122..0265394 100644 --- a/crates/disk/src/gen.rs +++ b/crates/disk/src/gen.rs @@ -115,7 +115,6 @@ pub async fn gen_test_data() -> Result<(), Error> { listen: None, port: 7780 + i1 as u16, port_raw: 7780 + i1 as u16 + 100, - cache_base_path: data_base_path.join(format!("node{:02}", i1)), sf_databuffer: Some(SfDatabuffer { data_base_path: data_base_path.join(format!("node{:02}", i1)), ksprefix: ksprefix.clone(), diff --git a/crates/httpret/src/api4/eventdata.rs b/crates/httpret/src/api4/eventdata.rs index a109db9..94dca28 100644 --- a/crates/httpret/src/api4/eventdata.rs +++ b/crates/httpret/src/api4/eventdata.rs @@ -16,8 +16,6 @@ use netpod::ServiceVersion; #[derive(Debug, ThisError)] pub enum EventDataError { - HttpBadMethod, - HttpBadAccept, QueryParse, #[error("Error({0})")] Error(Box), @@ -27,8 +25,6 @@ pub enum EventDataError { impl ToPublicError for EventDataError { fn to_public_error(&self) -> String { match self { - EventDataError::HttpBadMethod => format!("{self}"), - EventDataError::HttpBadAccept => format!("{self}"), EventDataError::QueryParse => format!("{self}"), EventDataError::Error(e) => e.to_public_error(), EventDataError::InternalError => format!("{self}"), diff --git a/crates/netpod/src/netpod.rs b/crates/netpod/src/netpod.rs index 7df04c5..a56b7c5 100644 --- a/crates/netpod/src/netpod.rs +++ b/crates/netpod/src/netpod.rs @@ -386,7 +386,6 @@ pub struct Node { pub port: u16, #[serde(deserialize_with = "serde_port::port_from_any", default)] pub port_raw: u16, - pub cache_base_path: PathBuf, pub sf_databuffer: Option, pub archiver_appliance: Option, pub channel_archiver: Option, @@ -474,7 +473,6 @@ impl Node { listen: None, port: 4444, port_raw: 4444, - cache_base_path: PathBuf::new(), sf_databuffer: Some(SfDatabuffer { data_base_path: PathBuf::new(), ksprefix: "daqlocal".into(), @@ -2936,7 +2934,6 @@ pub fn test_cluster() -> Cluster { listen: None, port: 6170 + id as u16, port_raw: 6170 + id as u16 + 100, - cache_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)), sf_databuffer: Some(SfDatabuffer { data_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)), ksprefix: "ks".into(), @@ -2973,7 +2970,6 @@ pub fn sls_test_cluster() -> Cluster { listen: None, port: 6190 + id as u16, port_raw: 6190 + id as u16 + 100, - cache_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)), sf_databuffer: None, archiver_appliance: None, channel_archiver: Some(ChannelArchiver { @@ -3008,7 +3004,6 @@ pub fn archapp_test_cluster() -> Cluster { listen: None, port: 6200 + id as u16, port_raw: 6200 + id as u16 + 100, - cache_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)), sf_databuffer: None, channel_archiver: None, archiver_appliance: Some(ArchiverAppliance { diff --git a/crates/nodenet/src/conn/test.rs b/crates/nodenet/src/conn/test.rs index 13b2391..bf7dc28 100644 --- a/crates/nodenet/src/conn/test.rs +++ b/crates/nodenet/src/conn/test.rs @@ -71,7 +71,6 @@ fn raw_data_00() { listen: None, port: 9090, port_raw: 9090, - cache_base_path: "".into(), sf_databuffer: Some(SfDatabuffer { data_base_path: "/home/dominik/daqbuffer-testdata/databuffer/node00".into(), ksprefix: "ks".into(),