Skip to content

Commit 580db9b

Browse files
Log worker failure
This should help debug early exits, by giving a clear indication of when a worker bails out. This should normally never happen; anytime it does also decreases our parallelism (as we don't respawn the worker), so should be tracked and avoided.
1 parent e339585 commit 580db9b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/runner/mod.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,17 @@ pub fn run_ex<DB: WriteResults + Sync>(
101101
let mut threads = Vec::new();
102102

103103
for worker in &workers {
104-
let join = scope
105-
.builder()
106-
.name(worker.name().into())
107-
.spawn(move || worker.run())?;
104+
let join =
105+
scope
106+
.builder()
107+
.name(worker.name().into())
108+
.spawn(move || match worker.run() {
109+
Ok(()) => Ok(()),
110+
Err(r) => {
111+
log::warn!("worker {} failed: {:?}", worker.name(), r);
112+
Err(r)
113+
}
114+
})?;
108115
threads.push(join);
109116
}
110117
let disk_watcher_thread =

0 commit comments

Comments
 (0)