···14141515use crate::{CreateRecord, DeleteAccount, DeleteRecord, EventBatch, ModifyRecord, UpdateRecord};
16161717-const MAX_BATCHED_RECORDS: usize = 128; // *non-blocking* limit. drops oldest batched record per collection once reached.
1818-const MAX_BATCHED_MODIFIES: usize = 512; // hard limit, total updates and deletes across all collections.
1919-const MAX_ACCOUNT_REMOVES: usize = 512; // hard limit, total account deletions. actually the least frequent event, but tiny.
2020-const MAX_BATCHED_COLLECTIONS: usize = 64; // hard limit, MAX_BATCHED_RECORDS applies per collection
1717+const MAX_BATCHED_RECORDS: usize = 64; // *non-blocking* limit. drops oldest batched record per collection once reached.
1818+const MAX_BATCHED_MODIFIES: usize = 32; // hard limit, total updates and deletes across all collections.
1919+const MAX_ACCOUNT_REMOVES: usize = 128; // hard limit, total account deletions. actually the least frequent event, but tiny.
2020+const MAX_BATCHED_COLLECTIONS: usize = 32; // hard limit, MAX_BATCHED_RECORDS applies per collection
2121const MIN_BATCH_SPAN_SECS: f64 = 2.; // try to get a bit of rest a bit.
2222const MAX_BATCH_SPAN_SECS: f64 = 60.; // hard limit of duration from oldest to latest event cursor within a batch, in seconds.
23232424const SEND_TIMEOUT_S: f64 = 60.;
2525-const BATCH_QUEUE_SIZE: usize = 512; // 4096 got OOM'd. update: 1024 also got OOM'd during L0 compaction blocking
2525+const BATCH_QUEUE_SIZE: usize = 64; // 4096 got OOM'd. update: 1024 also got OOM'd during L0 compaction blocking
26262727#[derive(Debug)]
2828struct Batcher {
+2
ufos/src/store.rs
···271271 // 4. reverse and try to walk back MAX_RETAINED steps
272272 // 5. if we didn't end iteration yet, start deleting records (and their forward links) until we get to the end
273273274274+ // oh we might be able to walk *forward* instead of reverse from the cursor, which might help avoid iterating over a lot of deletion tombstones
275275+274276 // ... we can probably do even better with cursor ranges too, since we'll have a cursor range from rollup and it's in the by_collection key
275277276278 Ok(())