comment out ack code for later use.

This commit is contained in:
appflowy 2022-01-24 21:23:57 +08:00
parent d97abcc99f
commit 22c8850cea
3 changed files with 9 additions and 8 deletions

View File

@ -15,7 +15,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi" CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
CARGO_MAKE_CRATE_NAME = "dart-ffi" CARGO_MAKE_CRATE_NAME = "dart-ffi"
VERSION = "0.0.2" VERSION = "0.0.2"
FEATURES = "flutter,http_server" FEATURES = "flutter"
PRODUCT_NAME = "AppFlowy" PRODUCT_NAME = "AppFlowy"
#CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html #CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html
CRATE_TYPE = "staticlib" CRATE_TYPE = "staticlib"

View File

@ -105,12 +105,13 @@ impl RevisionManager {
#[tracing::instrument(level = "debug", skip(self), err)] #[tracing::instrument(level = "debug", skip(self), err)]
pub async fn ack_revision(&self, rev_id: i64) -> Result<(), FlowyError> { pub async fn ack_revision(&self, rev_id: i64) -> Result<(), FlowyError> {
if self.revision_sync_seq.ack(&rev_id).await.is_ok() { // For the moment, we comment out the following code in order to cause sync bugs.
self.revision_cache.ack(rev_id).await; // if self.revision_sync_seq.ack(&rev_id).await.is_ok() {
// self.revision_cache.ack(rev_id).await;
#[cfg(feature = "flowy_unit_test")] //
let _ = self.revision_ack_notifier.send(rev_id); // #[cfg(feature = "flowy_unit_test")]
} // let _ = self.revision_ack_notifier.send(rev_id);
// }
Ok(()) Ok(())
} }

View File

@ -128,7 +128,7 @@ where
} }
Ordering::Equal => { Ordering::Equal => {
// Do nothing // Do nothing
tracing::warn!("Applied {} revision rev_id is the same as cur_rev_id", self.object_id); tracing::trace!("Applied {} revision rev_id is the same as cur_rev_id", self.object_id);
} }
Ordering::Greater => { Ordering::Greater => {
// The client delta is outdated. Transform the client revision delta and then // The client delta is outdated. Transform the client revision delta and then