Skip to content

Commit 54942ba

Browse files
leftwoAlan Hanson
and
Alan Hanson
authored
Fix double counting of repair jobs (oxidecomputer#767)
Fix double counting of repair jobs --------- Co-authored-by: Alan Hanson <alan@oxide.computer>
1 parent 40cc200 commit 54942ba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

upstairs/src/lib.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -2886,7 +2886,6 @@ impl Downstairs {
28862886
assert_eq!(old_state, IOState::New);
28872887
self.io_state_count.decr(&old_state, client_id);
28882888
self.io_state_count.incr(&new_state, client_id);
2889-
28902889
Some(job.work.clone())
28912890
}
28922891

@@ -3289,7 +3288,7 @@ impl Downstairs {
32893288
if *state == IOState::InProgress || *state == IOState::New {
32903289
info!(
32913290
self.log,
3292-
"{} change {} to fault skipped", client_id, ds_id
3291+
"[{}] change {} to fault skipped", client_id, ds_id
32933292
);
32943293
let old_state =
32953294
job.state.insert(client_id, IOState::Skipped).unwrap();
@@ -3481,9 +3480,6 @@ impl Downstairs {
34813480

34823481
let ds_id = io.ds_id;
34833482
debug!(self.log, "Enqueue repair job {}", ds_id);
3484-
for cid in 0..3 {
3485-
self.io_state_count.incr(&IOState::New, cid);
3486-
}
34873483
self.ds_active.insert(ds_id, io);
34883484
}
34893485

0 commit comments

Comments
 (0)