From b2133a0a8c6717f851a20dacef01de29e3fe4110 Mon Sep 17 00:00:00 2001 From: ikopylov Date: Sun, 5 Feb 2023 23:22:58 +0100 Subject: [PATCH 1/2] [596] Use read lock instead of write on hierarchical filters update (add_to_parents) --- bob-backend/src/pearl/group.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bob-backend/src/pearl/group.rs b/bob-backend/src/pearl/group.rs index 293ab7c6..dcfeb1c4 100644 --- a/bob-backend/src/pearl/group.rs +++ b/bob-backend/src/pearl/group.rs @@ -210,7 +210,7 @@ impl Group { .await?; let res = Self::put_common(&holder.1, key, data).await?; self.holders - .write() + .read() .await .add_to_parents(holder.0, &Key::from(key)); Ok(res) @@ -361,7 +361,7 @@ impl Group { let delete_count = Self::delete_common(holder.1.clone(), key, meta, true).await?; // We need to add marker record to alien regardless of record presence self.holders - .write() + .read() .await .add_to_parents(holder.0, &Key::from(key)); From d91ca9fb435502a85981a2fdf13f295390f6d081 Mon Sep 17 00:00:00 2001 From: ikopylov Date: Sun, 5 Feb 2023 23:24:50 +0100 Subject: [PATCH 2/2] [596] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81ec76a0..ab2baf18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Bob versions changelog #### Changed - Make local put parallel to remote (#573) - Build release binaries and docker images with `release-lto` profile (#714) +- Use read lock instead of write on hierarchical filters update to improve performance (#596) #### Fixed - Fix incorrect exist result due to variables sharing between keys (#762)