disable orphan remover (#2027)

This commit is contained in:
Brendan Allan
2024-02-01 12:57:43 +08:00
committed by GitHub
parent 4d33e2da4b
commit d86fb21267
7 changed files with 8 additions and 8 deletions

View File

@@ -393,7 +393,7 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
debug!("Disconnected {count} file paths from objects");
library.orphan_remover.invoke().await;
// library.orphan_remover.invoke().await;
}
// rescan location

View File

@@ -43,7 +43,7 @@ pub struct Library {
// pub key_manager: Arc<KeyManager>,
/// p2p identity
pub identity: Arc<Identity>,
pub orphan_remover: OrphanRemoverActor,
// pub orphan_remover: OrphanRemoverActor,
// The UUID which matches `config.instance_id`'s primary key.
pub instance_uuid: Uuid,
@@ -86,7 +86,7 @@ impl Library {
db: db.clone(),
// key_manager,
identity,
orphan_remover: OrphanRemoverActor::spawn(db),
// orphan_remover: OrphanRemoverActor::spawn(db),
instance_uuid,
env: node.env.clone(),
event_bus_tx: node.event_bus.0.clone(),

View File

@@ -494,7 +494,7 @@ impl Libraries {
.insert(library.id, Arc::clone(&library));
if should_seed {
library.orphan_remover.invoke().await;
// library.orphan_remover.invoke().await;
indexer::rules::seed::new_or_existing_library(&library).await?;
}

View File

@@ -497,7 +497,7 @@ impl StatefulJob for IndexerJobInit {
if run_metadata.total_updated_paths > 0 {
// Invoking orphan remover here as we probably have some orphans objects due to updates
ctx.library.orphan_remover.invoke().await;
// ctx.library.orphan_remover.invoke().await;
}
if run_metadata.indexed_count > 0

View File

@@ -190,7 +190,7 @@ pub async fn shallow(
invalidate_query!(library, "search.objects");
}
library.orphan_remover.invoke().await;
// library.orphan_remover.invoke().await;
Ok(())
}

View File

@@ -852,7 +852,7 @@ pub async fn delete_directory(
db.file_path().delete_many(children_params).exec().await?;
library.orphan_remover.invoke().await;
// library.orphan_remover.invoke().await;
invalidate_query!(library, "search.paths");
invalidate_query!(library, "search.objects");

View File

@@ -105,7 +105,7 @@ impl StatefulJob for FileDeleterJobInit {
let init = self;
invalidate_query!(ctx.library, "search.paths");
ctx.library.orphan_remover.invoke().await;
// ctx.library.orphan_remover.invoke().await;
Ok(Some(json!({ "init": init })))
}