Implement repair command

This commit is contained in:
Alex Auvolat
2020-04-19 20:36:36 +00:00
parent a54f3158f1
commit 5ae32972ef
4 changed files with 152 additions and 11 deletions
+6
View File
@@ -220,11 +220,17 @@ where
})
.collect::<FuturesUnordered<_>>();
let mut n_errors = 0;
while let Some(r) = sync_futures.next().await {
if let Err(e) = r {
n_errors += 1;
eprintln!("({}) Sync error: {}", self.table.name, e);
}
}
if n_errors > self.table.replication.max_write_errors() {
return Err(Error::Message(format!("Sync failed with too many nodes.")));
}
if !partition.retain {
self.table
.delete_range(&partition.begin, &partition.end)