handle revision acked && fix bugs

This commit is contained in:
appflowy
2021-10-08 13:46:23 +08:00
parent 97ac22ec02
commit 3cbce2c505
6 changed files with 204 additions and 204 deletions

View File

@ -112,6 +112,7 @@ impl ServerEditDoc {
},
Ordering::Equal => {
// Do nothing
log::warn!("Applied revision rev_id is the same as cur_rev_id");
},
Ordering::Greater => {
// The client document is outdated. Transform the client revision delta and then
@ -175,6 +176,10 @@ impl ServerEditDoc {
)
)]
fn compose_delta(&self, delta: Delta) -> Result<(), ServerError> {
if delta.is_empty() {
log::warn!("Composed delta is empty");
}
match self.document.try_write_for(Duration::from_millis(300)) {
None => {
log::error!("Failed to acquire write lock of document");