diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-03 14:50:22 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-03 15:18:23 +0000 |
| commit | 874a8abe1d076cfafd9baf919ec23d7d58200698 (patch) | |
| tree | dce0d0d36bddc496ff32f8555a8790d8dc7be7e4 /src/sync/mod.rs | |
| parent | 9fd4350c57bbe986ebf65bf3ea4c996572e81884 (diff) | |
| parent | 92a9a3bfe0bc522e8ae411991a366a3a6310d525 (diff) | |
Merge relay.ngit.dev migration: bug fixes and migration tooling
This merge includes critical bug fixes and comprehensive migration tooling
developed during the relay.ngit.dev migration effort.
Bug Fixes:
- Fix git protocol error handling to return HTTP 200 with ERR pkt-line
- Fix naughty list false positives and DNS failure identification
- Fix database query filters in load_existing_events (remove .since())
- Fix OID fetch tracking to distinguish 0 OIDs from successful fetches
- Fix purgatory event source tracking for filtered expiry logging
- Implement OID retry logic for 'not our ref' errors
Migration Tools & Documentation:
- Complete 5-phase migration analysis pipeline with orchestration script
- Phase 1: Event fetching from source relay
- Phase 2: Git sync verification
- Phase 3: Categorization and relay comparison
- Phase 4: Log extraction (parse failures, purgatory expiry)
- Phase 5: Action classification for migration decisions
- Comprehensive migration guide with lessons learned
- Troubleshooting guide for permission and corruption issues
Configuration:
- Add NGIT_LOG_LEVEL configuration option
- Update git throttle limits to 60/minute
- Improve logging throughout for better observability
Diffstat (limited to 'src/sync/mod.rs')
| -rw-r--r-- | src/sync/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sync/mod.rs b/src/sync/mod.rs index bc8c428..d6634ff 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs | |||
| @@ -584,6 +584,7 @@ impl SyncManager { | |||
| 584 | /// * `config` - Configuration for sync settings | 584 | /// * `config` - Configuration for sync settings |
| 585 | /// * `data_path` - Path to git data directory (for persistence) | 585 | /// * `data_path` - Path to git data directory (for persistence) |
| 586 | /// * `sync_metrics` - Optional pre-registered SyncMetrics (passed from Metrics if metrics are enabled) | 586 | /// * `sync_metrics` - Optional pre-registered SyncMetrics (passed from Metrics if metrics are enabled) |
| 587 | #[allow(clippy::too_many_arguments)] | ||
| 587 | pub fn new( | 588 | pub fn new( |
| 588 | bootstrap_relay_url: Option<String>, | 589 | bootstrap_relay_url: Option<String>, |
| 589 | service_domain: String, | 590 | service_domain: String, |
| @@ -1442,6 +1443,7 @@ impl SyncManager { | |||
| 1442 | self.service_domain.clone(), | 1443 | self.service_domain.clone(), |
| 1443 | Arc::clone(&self.repo_sync_index), | 1444 | Arc::clone(&self.repo_sync_index), |
| 1444 | action_tx, | 1445 | action_tx, |
| 1446 | self.database.clone(), | ||
| 1445 | ); | 1447 | ); |
| 1446 | let subscriber_shutdown = shutdown_tx.subscribe(); | 1448 | let subscriber_shutdown = shutdown_tx.subscribe(); |
| 1447 | tokio::spawn(async move { self_subscriber.run(Some(subscriber_shutdown)).await }); | 1449 | tokio::spawn(async move { self_subscriber.run(Some(subscriber_shutdown)).await }); |
| @@ -2811,6 +2813,7 @@ impl SyncManager { | |||
| 2811 | event_id = %event.id, | 2813 | event_id = %event.id, |
| 2812 | kind = %event.kind.as_u16(), | 2814 | kind = %event.kind.as_u16(), |
| 2813 | identifier = %identifier, | 2815 | identifier = %identifier, |
| 2816 | pubkey = %event.pubkey, | ||
| 2814 | "Added rejected announcement to two-tier index" | 2817 | "Added rejected announcement to two-tier index" |
| 2815 | ); | 2818 | ); |
| 2816 | } | 2819 | } |