Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2c7e43f

Browse files
committedFeb 7, 2024
Remove unused fields
1 parent 2bf0c0e commit 2c7e43f

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed
 

‎downstairs/src/lib.rs

+2-25
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,11 @@ enum IOop {
8585
extent: usize,
8686
flush_number: u64,
8787
gen_number: u64,
88-
source_downstairs: ClientId,
89-
repair_downstairs: Vec<ClientId>,
9088
},
9189
ExtentLiveRepair {
9290
dependencies: Vec<JobId>, // Jobs that must finish before this
9391
extent: usize,
94-
source_downstairs: ClientId,
9592
source_repair_address: SocketAddr,
96-
repair_downstairs: Vec<ClientId>,
9793
},
9894
ExtentLiveReopen {
9995
dependencies: Vec<JobId>, // Jobs that must finish before this
@@ -750,8 +746,6 @@ async fn proc_frame(
750746
extent: extent_id,
751747
flush_number,
752748
gen_number,
753-
source_downstairs: ClientId::new(0), // Unused in the downstairs
754-
repair_downstairs: vec![], // Unused in the downstairs
755749
};
756750

757751
let d = ad.lock().await;
@@ -764,8 +758,8 @@ async fn proc_frame(
764758
job_id,
765759
dependencies,
766760
extent_id,
767-
source_client_id,
768761
source_repair_address,
762+
..
769763
} => {
770764
if !is_message_valid(
771765
upstairs_connection,
@@ -783,9 +777,8 @@ async fn proc_frame(
783777
let new_repair = IOop::ExtentLiveRepair {
784778
dependencies,
785779
extent: extent_id,
786-
source_downstairs: source_client_id,
780+
787781
source_repair_address,
788-
repair_downstairs: vec![],
789782
};
790783

791784
let d = ad.lock().await;
@@ -2275,8 +2268,6 @@ impl Downstairs {
22752268
extent,
22762269
flush_number,
22772270
gen_number,
2278-
source_downstairs: _,
2279-
repair_downstairs: _,
22802271
} => {
22812272
let result = if !self.is_active(job.upstairs_connection) {
22822273
error!(self.log, "Upstairs inactive error");
@@ -2321,9 +2312,7 @@ impl Downstairs {
23212312
IOop::ExtentLiveRepair {
23222313
dependencies,
23232314
extent,
2324-
source_downstairs: _,
23252315
source_repair_address,
2326-
repair_downstairs: _,
23272316
} => {
23282317
debug!(
23292318
self.log,
@@ -3715,8 +3704,6 @@ mod test {
37153704
extent: 1,
37163705
flush_number: 1,
37173706
gen_number: 2,
3718-
source_downstairs: ClientId::new(0),
3719-
repair_downstairs: vec![ClientId::new(1)],
37203707
};
37213708
ds.add_work(upstairs_connection, JobId(1001), rio).await?;
37223709

@@ -3803,8 +3790,6 @@ mod test {
38033790
extent: 1,
38043791
flush_number: 1,
38053792
gen_number: gen,
3806-
source_downstairs: ClientId::new(0),
3807-
repair_downstairs: vec![ClientId::new(1)],
38083793
};
38093794
ds.add_work(upstairs_connection, JobId(1001), rio).await?;
38103795

@@ -4232,8 +4217,6 @@ mod test {
42324217
extent: eid as usize,
42334218
flush_number: 3,
42344219
gen_number: gen,
4235-
source_downstairs: ClientId::new(0),
4236-
repair_downstairs: vec![ClientId::new(1)],
42374220
};
42384221
ds.add_work(upstairs_connection, JobId(1001), rio).await?;
42394222

@@ -4360,8 +4343,6 @@ mod test {
43604343
extent: eid_one as usize,
43614344
flush_number: 6,
43624345
gen_number: gen,
4363-
source_downstairs: ClientId::new(0),
4364-
repair_downstairs: vec![ClientId::new(1)],
43654346
};
43664347
ds.add_work(upstairs_connection, JobId(1002), rio).await?;
43674348

@@ -4530,8 +4511,6 @@ mod test {
45304511
extent: eid,
45314512
flush_number: 1,
45324513
gen_number: 2,
4533-
source_downstairs: ClientId::new(0),
4534-
repair_downstairs: vec![ClientId::new(1)],
45354514
};
45364515
test_misc_work_through_work_queue(JobId(1000), ioop);
45374516
}
@@ -4547,9 +4526,7 @@ mod test {
45474526
let ioop = IOop::ExtentLiveRepair {
45484527
dependencies: vec![],
45494528
extent: eid,
4550-
source_downstairs: ClientId::new(0),
45514529
source_repair_address,
4552-
repair_downstairs: vec![ClientId::new(1)],
45534530
};
45544531
test_misc_work_through_work_queue(JobId(1000), ioop);
45554532
}

0 commit comments

Comments
 (0)
Please sign in to comment.