Implement dumpless upgrade from v1.15 to v1.16

This commit is contained in:
Louis Dureuil
2025-07-07 11:57:08 +02:00
parent 73c9c1ebdc
commit a3254d7d7d
4 changed files with 72 additions and 0 deletions

View File

@ -117,6 +117,13 @@ impl EmbeddingStatus {
Default::default()
}
/// Create a new `EmbeddingStatus` that assumes that any `user_provided` docid is also skipping regenerate.
///
/// Used for migration from v1.15 and earlier DBs.
pub(crate) fn from_user_provided(user_provided: RoaringBitmap) -> Self {
Self { user_provided, skip_regenerate_different_from_user_provided: Default::default() }
}
/// Whether the document contains user-provided vectors for that embedder.
pub fn is_user_provided(&self, docid: DocumentId) -> bool {
self.user_provided.contains(docid)