mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 13:38:49 +08:00
fix(native): misalignment between index clock and snapshot clock (#14688)
fix #14191 #### PR Dependency Tree * **PR #14688** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved indexer synchronization timing for clock persistence to prevent premature completion signals * Enhanced document-level indexing status tracking accuracy * Optimized refresh behavior for better state consistency * **Chores** * Updated indexer versioning system <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -5,6 +5,10 @@ use serde::Serialize;
|
||||
use sqlx::Row;
|
||||
use y_octo::DocOptions;
|
||||
|
||||
// Increment this whenever there is a breaking change in the index format or how
|
||||
// updates are applied
|
||||
const NBSTORE_INDEXER_VERSION: u32 = 1;
|
||||
|
||||
use super::{
|
||||
error::{Error, Result},
|
||||
storage::SqliteDocStorage,
|
||||
@@ -192,7 +196,7 @@ impl SqliteDocStorage {
|
||||
}
|
||||
|
||||
pub fn index_version() -> u32 {
|
||||
memory_indexer::InMemoryIndex::snapshot_version()
|
||||
memory_indexer::InMemoryIndex::snapshot_version() + NBSTORE_INDEXER_VERSION
|
||||
}
|
||||
|
||||
pub async fn fts_add(&self, index_name: &str, doc_id: &str, text: &str, index: bool) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user