Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused fields from downstairs IOop #1149

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 2 additions & 25 deletions downstairs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,11 @@ enum IOop {
extent: usize,
flush_number: u64,
gen_number: u64,
source_downstairs: ClientId,
repair_downstairs: Vec<ClientId>,
},
ExtentLiveRepair {
dependencies: Vec<JobId>, // Jobs that must finish before this
extent: usize,
source_downstairs: ClientId,
source_repair_address: SocketAddr,
repair_downstairs: Vec<ClientId>,
},
ExtentLiveReopen {
dependencies: Vec<JobId>, // Jobs that must finish before this
Expand Down Expand Up @@ -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;
Expand All @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -2321,9 +2312,7 @@ impl Downstairs {
IOop::ExtentLiveRepair {
dependencies,
extent,
source_downstairs: _,
source_repair_address,
repair_downstairs: _,
} => {
debug!(
self.log,
Expand Down Expand Up @@ -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?;

Expand Down Expand Up @@ -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?;

Expand Down Expand Up @@ -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?;

Expand Down Expand Up @@ -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?;

Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
Loading