Skip to content

Commit

Permalink
Always replicate vectors metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
javitonino committed Sep 25, 2024
1 parent 4b324d2 commit cf2cf24
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions nucliadb_vectors/src/service/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use nucliadb_core::protos::ResourceId;
use nucliadb_core::tracing::{self, *};
use nucliadb_core::vectors::MergeMetrics;
use nucliadb_core::vectors::*;
use nucliadb_core::{IndexFiles, RawReplicaState};
use nucliadb_core::IndexFiles;
use nucliadb_procs::measure;
use std::collections::HashMap;
use std::fmt::Debug;
Expand Down Expand Up @@ -193,11 +193,6 @@ impl VectorWriter for VectorWriterService {
// Should be called along with a lock at a higher level to be safe
let replica_state = replication::get_index_files(&self.path, prefix, ignored_segment_ids)?;

if replica_state.files.is_empty() {
// exit with no changes
return Ok(IndexFiles::Other(RawReplicaState::default()));
}

Ok(IndexFiles::Other(replica_state))
}
}
Expand Down

0 comments on commit cf2cf24

Please sign in to comment.