Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm

repair task maybe working?

Changed files
+6 -2
constellation
src
bin
storage
+1 -1
constellation/src/bin/main.rs
···
let rocks = rocks.clone();
let stay_alive = stay_alive.clone();
s.spawn(move || {
-
let rep = rocks.run_repair(time::Duration::from_millis(1), stay_alive);
+
let rep = rocks.run_repair(time::Duration::from_millis(0), stay_alive);
eprintln!("repair finished: {rep:?}");
rep
});
+5 -1
constellation/src/storage/rocks_store.rs
···
let mut maybe_done = false;
+
let mut write_fast = rocksdb::WriteOptions::default();
+
write_fast.set_sync(false);
+
write_fast.disable_wal(true);
+
while !stay_alive.is_cancelled() && !maybe_done {
// let mut batch = WriteBatch::default();
···
let target_id: TargetId = _vr(iter.value().unwrap())?;
self.db
-
.put_cf(&cf, target_id.id().to_be_bytes(), _rv(&target))?;
+
.put_cf_opt(&cf, target_id.id().to_be_bytes(), _rv(&target), &write_fast)?;
any_written = true;
iter.next();
}