mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 10:21:53 +00:00
submodules
This commit is contained in:
@@ -10,13 +10,13 @@ edition = "2018"
|
||||
async-trait = "0.1.42"
|
||||
fd-lock-rs = "0.1.3"
|
||||
futures = "0.3.8"
|
||||
json-patch = { path = "../../json-patch" }
|
||||
json-ptr = { path = "../../json-ptr" }
|
||||
json-patch = { path = "../json-patch" }
|
||||
json-ptr = { path = "../json-ptr" }
|
||||
nix = "0.20.0"
|
||||
qutex-2 = { path = "../../qutex" }
|
||||
qutex-2 = { path = "../qutex" }
|
||||
serde = { version = "1.0.118", features = ["rc"] }
|
||||
serde_json = "1.0.61"
|
||||
serde_cbor = { git = "https://github.com/dr-bonez/cbor.git" }
|
||||
serde_cbor = { path = "../cbor" }
|
||||
thiserror = "1.0.23"
|
||||
tokio = { version = "1.0.1", features = ["sync", "fs", "rt", "io-util", "macros"] }
|
||||
|
||||
|
||||
@@ -880,8 +880,8 @@ impl Locker {
|
||||
async fn add_write_lock<S: AsRef<str> + Clone, V: SegList + Clone>(
|
||||
&self,
|
||||
ptr: &JsonPointer<S, V>,
|
||||
locks: &mut Vec<(JsonPointer, LockerGuard)>,
|
||||
extra_locks: &mut [&mut [(JsonPointer, LockerGuard)]],
|
||||
locks: &mut Vec<(JsonPointer, LockerGuard)>, // tx locks
|
||||
extra_locks: &mut [&mut [(JsonPointer, LockerGuard)]], // tx parent locks
|
||||
) {
|
||||
let mut final_lock = None;
|
||||
for lock in extra_locks
|
||||
@@ -900,7 +900,7 @@ impl Locker {
|
||||
lock.1 = match guard {
|
||||
LockerGuard::Read(LockerReadGuard(guard)) if !remainder.is_empty() => {
|
||||
// read guard already exists at higher level
|
||||
let mut lock = guard.try_lock().unwrap();
|
||||
let mut lock = guard.lock().await;
|
||||
if let Some(l) = lock.take() {
|
||||
let mut orig_lock = None;
|
||||
let mut lock = ReadGuard::upgrade(l).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user