+44
-32
link_aggregator/src/storage/rocks_store.rs
+44
-32
link_aggregator/src/storage/rocks_store.rs
···-self.delete_record_link(batch, &record_link_key); // _could_ use delete range here instead of individual deletes, but since we have to scan anyway it's not obvious if it's better
···+// use a separate batch for all their links, since it can be a lot and make us crash at around 1GiB batch size.+// this should still hopefully be crash-safe: as long as we don't actually delete the DidId entry until after all links are cleared.+// the above .delete_did_id_value is batched, so it shouldn't be written until we've returned from this fn successfully+self.delete_record_link(&mut mini_batch, &record_link_key); // _could_ use delete range here instead of individual deletes, but since we have to scan anyway it's not obvious if it's better