From 2c7e43fae54f8d3785c790c16467a00c46b1f54e Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Wed, 7 Feb 2024 11:35:59 -0500 Subject: [PATCH] Remove unused fields --- downstairs/src/lib.rs | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/downstairs/src/lib.rs b/downstairs/src/lib.rs index 50dd3de19..6ab3a6438 100644 --- a/downstairs/src/lib.rs +++ b/downstairs/src/lib.rs @@ -85,15 +85,11 @@ enum IOop { extent: usize, flush_number: u64, gen_number: u64, - source_downstairs: ClientId, - repair_downstairs: Vec, }, ExtentLiveRepair { dependencies: Vec, // Jobs that must finish before this extent: usize, - source_downstairs: ClientId, source_repair_address: SocketAddr, - repair_downstairs: Vec, }, ExtentLiveReopen { dependencies: Vec, // Jobs that must finish before this @@ -750,8 +746,6 @@ async fn proc_frame( extent: extent_id, flush_number, gen_number, - source_downstairs: ClientId::new(0), // Unused in the downstairs - repair_downstairs: vec![], // Unused in the downstairs }; let d = ad.lock().await; @@ -764,8 +758,8 @@ async fn proc_frame( job_id, dependencies, extent_id, - source_client_id, source_repair_address, + .. } => { if !is_message_valid( upstairs_connection, @@ -783,9 +777,8 @@ async fn proc_frame( let new_repair = IOop::ExtentLiveRepair { dependencies, extent: extent_id, - source_downstairs: source_client_id, + source_repair_address, - repair_downstairs: vec![], }; let d = ad.lock().await; @@ -2275,8 +2268,6 @@ impl Downstairs { extent, flush_number, gen_number, - source_downstairs: _, - repair_downstairs: _, } => { let result = if !self.is_active(job.upstairs_connection) { error!(self.log, "Upstairs inactive error"); @@ -2321,9 +2312,7 @@ impl Downstairs { IOop::ExtentLiveRepair { dependencies, extent, - source_downstairs: _, source_repair_address, - repair_downstairs: _, } => { debug!( self.log, @@ -3715,8 +3704,6 @@ mod test { extent: 1, flush_number: 1, gen_number: 2, - source_downstairs: ClientId::new(0), - repair_downstairs: vec![ClientId::new(1)], }; ds.add_work(upstairs_connection, JobId(1001), rio).await?; @@ -3803,8 +3790,6 @@ mod test { extent: 1, flush_number: 1, gen_number: gen, - source_downstairs: ClientId::new(0), - repair_downstairs: vec![ClientId::new(1)], }; ds.add_work(upstairs_connection, JobId(1001), rio).await?; @@ -4232,8 +4217,6 @@ mod test { extent: eid as usize, flush_number: 3, gen_number: gen, - source_downstairs: ClientId::new(0), - repair_downstairs: vec![ClientId::new(1)], }; ds.add_work(upstairs_connection, JobId(1001), rio).await?; @@ -4360,8 +4343,6 @@ mod test { extent: eid_one as usize, flush_number: 6, gen_number: gen, - source_downstairs: ClientId::new(0), - repair_downstairs: vec![ClientId::new(1)], }; ds.add_work(upstairs_connection, JobId(1002), rio).await?; @@ -4530,8 +4511,6 @@ mod test { extent: eid, flush_number: 1, gen_number: 2, - source_downstairs: ClientId::new(0), - repair_downstairs: vec![ClientId::new(1)], }; test_misc_work_through_work_queue(JobId(1000), ioop); } @@ -4547,9 +4526,7 @@ mod test { let ioop = IOop::ExtentLiveRepair { dependencies: vec![], extent: eid, - source_downstairs: ClientId::new(0), source_repair_address, - repair_downstairs: vec![ClientId::new(1)], }; test_misc_work_through_work_queue(JobId(1000), ioop); }