mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
zero out graves before comparison, instead of at creation
Will allow us to turn the check back on in the future without a client update
This commit is contained in:
parent
3ee18fb854
commit
79ec9b14b1
2 changed files with 6 additions and 5 deletions
|
@ -48,10 +48,7 @@ impl SqliteStorage {
|
|||
cards: self.table_count("cards")?,
|
||||
notes: self.table_count("notes")?,
|
||||
revlog: self.table_count("revlog")?,
|
||||
// clients on schema 17 and below may send duplicate
|
||||
// deletion markers, so we can't compare graves until
|
||||
// the minimum syncing version is schema 18.
|
||||
graves: 0,
|
||||
graves: self.table_count("graves")?,
|
||||
notetypes: self.table_count("notetypes")?,
|
||||
decks: self.table_count("decks")?,
|
||||
deck_config: self.table_count("deck_config")?,
|
||||
|
|
|
@ -149,9 +149,13 @@ impl SyncServer for LocalServer {
|
|||
}
|
||||
|
||||
async fn sanity_check(&mut self, mut client: SanityCheckCounts) -> Result<SanityCheckResponse> {
|
||||
let mut server = self.col.storage.sanity_check_info()?;
|
||||
client.counts = Default::default();
|
||||
// clients on schema 17 and below may send duplicate
|
||||
// deletion markers, so we can't compare graves until
|
||||
// the minimum syncing version is schema 18.
|
||||
client.graves = 0;
|
||||
let server = self.col.storage.sanity_check_info()?;
|
||||
server.graves = 0;
|
||||
Ok(SanityCheckResponse {
|
||||
status: if client == server {
|
||||
SanityCheckStatus::Ok
|
||||
|
|
Loading…
Reference in a new issue