Defer operations when their parent is missing

This commit is contained in:
Nathan Sobo 2023-07-19 15:28:22 -06:00
parent 8003e84d11
commit 88c46e091e
3 changed files with 101 additions and 19 deletions

View file

@ -3,6 +3,7 @@ use crate::{
OperationCount, OperationId, ReplicaId, RepoId, Request, RevisionId, RoomCredentials,
};
use collections::BTreeMap;
use lazy_static::__Deref;
use serde::{Deserialize, Serialize};
use std::{any::Any, sync::Arc};
@ -141,7 +142,7 @@ impl Operation {
}
}
pub fn parent(&self) -> &RevisionId {
pub fn revision(&self) -> &RevisionId {
match self {
Operation::CreateDocument(op) => &op.parent,
Operation::Edit(op) => &op.parent,