mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 10:21:53 +00:00
fix: revert from ciborium to serde_cbor_2, make apply_patches iterative
- ciborium's deserialize_str bug (#32) caused DB deserialization to fail silently, nuking the database value to null on compress - Switch to dr-bonez/cbor fork (serde_cbor_2) which has StreamDeserializer change_output_type support - Propagate deserialization errors instead of falling back to null - Convert apply_patches from recursion to iteration to prevent stack overflow on patches with many operations (e.g. 953 ops)
This commit is contained in:
@@ -3,7 +3,7 @@ authors = ["Aiden McClelland <aiden@start9labs.com>"]
|
||||
categories = ["database-implementations"]
|
||||
description = "A database that tracks state updates as RFC 6902 JSON Patches"
|
||||
edition = "2018"
|
||||
keywords = ["json", "json-pointer", "json-patch"]
|
||||
keywords = ["json", "json-patch", "json-pointer"]
|
||||
license = "MIT"
|
||||
name = "patch-db"
|
||||
readme = "README.md"
|
||||
@@ -18,6 +18,7 @@ unstable = []
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1.42"
|
||||
serde_cbor = { package = "serde_cbor_2", git = "https://github.com/dr-bonez/cbor.git" }
|
||||
fd-lock-rs = "0.1.3"
|
||||
futures = "0.3.8"
|
||||
imbl = "6"
|
||||
@@ -25,24 +26,23 @@ imbl-value = "0.4.1"
|
||||
json-patch = { path = "../json-patch" }
|
||||
json-ptr = { path = "../json-ptr" }
|
||||
lazy_static = "1.4.0"
|
||||
tracing = { version = "0.1.29", optional = true }
|
||||
tracing-error = { version = "0.2.0", optional = true }
|
||||
nix = "0.30.1"
|
||||
patch-db-macro = { path = "../macro" }
|
||||
serde = { version = "1", features = ["rc"] }
|
||||
ciborium = "0.2"
|
||||
thiserror = "2"
|
||||
tokio = { version = "1", features = ["sync", "fs", "rt", "io-util", "macros"] }
|
||||
tokio = { version = "1", features = ["fs", "io-util", "macros", "rt", "sync"] }
|
||||
tracing = { version = "0.1.29", optional = true }
|
||||
tracing-error = { version = "0.2.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
proptest = "1.0.0"
|
||||
serde = { version = "1.0.118", features = ["rc", "derive"] }
|
||||
rand = "0.9.1"
|
||||
serde = { version = "1.0.118", features = ["derive", "rc"] }
|
||||
tokio = { version = "1.0.1", features = [
|
||||
"sync",
|
||||
"fs",
|
||||
"rt",
|
||||
"rt-multi-thread",
|
||||
"io-util",
|
||||
"macros",
|
||||
"rt",
|
||||
"rt-multi-thread",
|
||||
"sync",
|
||||
] }
|
||||
rand = "0.9.1"
|
||||
|
||||
Reference in New Issue
Block a user