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