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

Configure Feed

Select the types of activity you want to include in your feed.

don't fail merge op ever

...get constellation back up for now

what's the right thing to do here

phil 6743151a 98906127

+15 -5
+1
constellation/readme.md
··· 151 151 - [ ] write time hist 152 152 - [ ] read ops (api) 153 153 - [ ] expose internal stats? 154 + - [ ] figure out what's the right thing to do if merge op fails. happened on startup after an unclean reboot. 154 155 155 156 156 157 cache
+14 -5
constellation/src/storage/rocks_store.rs
··· 271 271 } 272 272 273 273 fn merge_op_extend_did_ids( 274 - _new_key: &[u8], 274 + key: &[u8], 275 275 existing: Option<&[u8]>, 276 276 operands: &MergeOperands, 277 277 ) -> Option<Vec<u8>> { ··· 282 282 existing_linkers 283 283 } 284 284 Err(e) => { 285 - eprintln!("bug? could not deserialize existing target linkers: {e:?}"); 286 - return None; 285 + eprintln!("bug? could not deserialize existing target linkers: {e:?}. key={key:?}. continuing, but data will be lost!"); 286 + if existing_bytes.len() < 1000 { 287 + eprintln!("dropping: {existing_bytes:?}"); 288 + } else { 289 + eprintln!("(too long to print)"); 290 + } 291 + Vec::with_capacity(operands.len()) 287 292 } 288 293 } 289 294 } else { ··· 293 298 match _vr(new_linkers) { 294 299 Ok(TargetLinkers(new_linkers)) => linkers.extend(new_linkers), 295 300 Err(e) => { 296 - eprintln!("bug? could not deserialize new target linkrers: {e:?}"); 297 - return None; 301 + eprintln!("bug? could not deserialize new target linkrers: {e:?}. key={key:?}. continuing, but data will be lost!"); 302 + if new_linkers.len() < 1000 { 303 + eprintln!("skipping: {new_linkers:?}"); 304 + } else { 305 + eprintln!("(too long to print)"); 306 + } 298 307 } 299 308 } 300 309 }