at protocol indexer with flexible filtering, xrpc queries, and a cursor-backed event stream, built on fjall
at-protocol atproto indexer rust fjall

[backfill] properly adjust counts if backfill error-red

ptr.pet 5053bab7 75d3bc5c

verified
+4 -5
+4 -5
src/backfill/mod.rs
··· 187 }; 188 189 let mut batch = state.db.inner.batch(); 190 - 191 batch.insert(&state.db.resync, &did_key, serialized_resync_state); 192 - 193 if let Some(state_bytes) = serialized_repo_state { 194 batch.insert(&state.db.repos, &did_key, state_bytes); 195 } 196 - 197 - // 5. remove from pending 198 - batch.remove(&state.db.pending, &did_key); 199 batch.commit().into_diagnostic() 200 } 201 }) 202 .await 203 .into_diagnostic()??; 204 } 205 } 206
··· 187 }; 188 189 let mut batch = state.db.inner.batch(); 190 batch.insert(&state.db.resync, &did_key, serialized_resync_state); 191 + batch.remove(&state.db.pending, &did_key); 192 if let Some(state_bytes) = serialized_repo_state { 193 batch.insert(&state.db.repos, &did_key, state_bytes); 194 } 195 batch.commit().into_diagnostic() 196 } 197 }) 198 .await 199 .into_diagnostic()??; 200 + 201 + state.db.update_count_async("resync", 1).await; 202 + state.db.update_count_async("pending", -1).await; 203 } 204 } 205