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

use remove_weak for secondary rank indexes

*hopefully* reduces write amplification, read amplification, space amplification, and maybe even compaction stalls?

Changed files
+4 -2
ufos
+4 -2
ufos/src/storage_fjall.rs
···
AllTimeRecordsKey::new(new_creates_count.into(), &nsid).to_db_bytes()?,
),
};
-
batch.remove(&self.rollups, &old_k); // TODO: when fjall gets weak delete, this will hopefully work way better
+
// remove_weak is allowed here because the secondary ranking index only ever inserts once at a key
+
batch.remove_weak(&self.rollups, &old_k);
batch.insert(&self.rollups, &new_k, "");
···
AllTimeDidsKey::new(new_dids_estimate.into(), &nsid).to_db_bytes()?,
),
};
-
batch.remove(&self.rollups, &old_k); // TODO: when fjall gets weak delete, this will hopefully work way better
+
// remove_weak is allowed here because the secondary ranking index only ever inserts once at a key
+
batch.remove_weak(&self.rollups, &old_k);
batch.insert(&self.rollups, &new_k, "");