lightweight com.atproto.sync.listReposByCollection
45
fork

Configure Feed

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

debug: firehose reconnect cursor gap

phil 59c77fc2 f98d2b6c

+14
+14
src/sync/firehose/mod.rs
··· 148 148 // `_sink` kept alive so the write half of the WebSocket isn't dropped. 149 149 let (_sink, mut messages) = stream.into_stream(); 150 150 let mut last_message_at = Instant::now(); 151 + let mut first_seq_logged = false; 151 152 152 153 loop { 153 154 // Unified select! driving both the WebSocket stream and worker ··· 231 232 last_message_at = Instant::now(); 232 233 backoff_secs = 1; 233 234 if let Some(seq) = self.dispatch(msg, &mut dispatcher) { 235 + if !first_seq_logged { 236 + first_seq_logged = true; 237 + let gap = connect_cursor 238 + .map(|c| format!("{}", seq - c as i64)) 239 + .unwrap_or("[no connect cursor]".to_string()); 240 + info!( 241 + host = %self.host, 242 + cursor = ?connect_cursor, 243 + first_seq = seq, 244 + gap, 245 + "firehose replay started", 246 + ); 247 + } 234 248 last_seq = seq; 235 249 } 236 250 }