{"record":{"id":"b7d6b3d8dcf3332e","repo":"spacedriveapp/spacedrive","slug":"sync-already-in-progress-for-this-conduit","errorCode":null,"errorMessage":"Sync already in progress for this conduit","messagePattern":"Sync already in progress for this conduit","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/src/service/file_sync/mod.rs","lineNumber":85,"sourceCode":"\t\t\tlibrary,\n\t\t\tconduit_manager,\n\t\t\tresolver,\n\t\t\tactive_syncs: Arc::new(RwLock::new(HashMap::new())),\n\t\t}\n\t}\n\n\t/// Trigger sync for a conduit\n\tpub async fn sync_now(&self, conduit_id: i32) -> Result<SyncHandle> {\n\t\t// Load conduit\n\t\tlet conduit = self.conduit_manager.get_conduit(conduit_id).await?;\n\n\t\tif !conduit.enabled {\n\t\t\treturn Err(anyhow::anyhow!(\"Conduit is disabled\"));\n\t\t}\n\n\t\t// Check if already syncing\n\t\tif self.active_syncs.read().await.contains_key(&conduit_id) {\n\t\t\treturn Err(anyhow::anyhow!(\"Sync already in progress for this conduit\"));\n\t\t}\n\n\t\t// Calculate sync operations\n\t\tinfo!(\"Calculating sync operations for conduit {}\", conduit_id);\n\t\tlet operations = self.resolver.calculate_operations(&conduit).await?;\n\n\t\tlet mode = sync_conduit::SyncMode::from_str(&conduit.sync_mode)\n\t\t\t.ok_or_else(|| anyhow::anyhow!(\"Invalid sync mode\"))?;\n\n\t\tlet copy_count = operations.source_to_target.to_copy.len()\n\t\t\t+ operations\n\t\t\t\t.target_to_source\n\t\t\t\t.as_ref()\n\t\t\t\t.map(|ops| ops.to_copy.len())\n\t\t\t\t.unwrap_or(0);\n\t\tlet delete_count = operations.source_to_target.to_delete.len()\n\t\t\t+ operations\n\t\t\t\t.target_to_source","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/core/src/service/file_sync/mod.rs#L67-L103","documentation":"Error \"Sync already in progress for this conduit\" thrown in spacedriveapp/spacedrive.","triggerScenarios":"Thrown at core/src/service/file_sync/mod.rs:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}