mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 02:11:54 +00:00
more logging
This commit is contained in:
committed by
Aiden McClelland
parent
f7d3bc07da
commit
78cc5316a3
@@ -177,6 +177,9 @@ impl Store {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
#[cfg(feature = "log")]
|
||||
log::trace!("Attempting to apply patch: {:?}", patch);
|
||||
|
||||
self.check_cache_corrupted()?;
|
||||
let patch_bin = serde_cbor::to_vec(&*patch)?;
|
||||
json_patch::patch(self.get_data_mut()?, &*patch)?;
|
||||
@@ -274,8 +277,6 @@ impl PatchDb {
|
||||
} else {
|
||||
self.store.write().await
|
||||
};
|
||||
#[cfg(feature = "log")]
|
||||
log::trace!("Attempting to apply patch: {:?}", patch);
|
||||
let rev = store.apply(patch, expire_id).await?;
|
||||
if let Some(rev) = rev.as_ref() {
|
||||
self.subscriber.send(rev.clone()).unwrap_or_default(); // ignore errors
|
||||
|
||||
@@ -146,7 +146,13 @@ impl<Parent: DbHandle + Send + Sync> DbHandle for Transaction<Parent> {
|
||||
self.rebase()?;
|
||||
self.parent.get_value(ptr, Some(store)).await?
|
||||
};
|
||||
json_patch::patch(&mut data, &*self.updates.for_path(ptr))?;
|
||||
let path_updates = self.updates.for_path(ptr);
|
||||
if !(path_updates.0).0.is_empty() {
|
||||
#[cfg(feature = "log")]
|
||||
log::trace!("applying patch {:?} at path {}", path_updates, ptr);
|
||||
|
||||
json_patch::patch(&mut data, &*path_updates)?;
|
||||
}
|
||||
Ok(data)
|
||||
}
|
||||
async fn put_value<S: AsRef<str> + Send + Sync, V: SegList + Send + Sync>(
|
||||
|
||||
Reference in New Issue
Block a user