Skip to content

Commit

Permalink
tx naming
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein committed Jul 5, 2024
1 parent 154a071 commit 691bc85
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sled-agent/src/dump_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ impl DumpSetupWorker {
// This is particularly useful for disk expungement, when a caller
// wants to ensure that the dump device is no longer accessing an
// old device.
let mut last_update_complete_tx = None;
let mut evaluation_and_archiving_complete_tx = None;

loop {
match tokio::time::timeout(ARCHIVAL_INTERVAL, self.rx.recv()).await
Expand All @@ -535,7 +535,8 @@ impl DumpSetupWorker {
core_datasets,
update_complete_tx,
})) => {
last_update_complete_tx = Some(update_complete_tx);
evaluation_and_archiving_complete_tx =
Some(update_complete_tx);
self.update_disk_loadout(
dump_slices,
debug_datasets,
Expand All @@ -562,7 +563,7 @@ impl DumpSetupWorker {
error!(self.log, "Failed to archive debug/dump files: {err:?}");
}

if let Some(tx) = last_update_complete_tx.take() {
if let Some(tx) = evaluation_and_archiving_complete_tx.take() {
if let Err(err) = tx.send(()) {
error!(self.log, "DumpDevice failed to notify caller"; "err" => ?err);
}
Expand Down

0 comments on commit 691bc85

Please sign in to comment.