Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

596 avoid write lock on hierarchical filter update #770

Merged
merged 3 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Bob versions changelog
- Make local put parallel to remote (#573)
- Prefer online nodes for aliens, while maintaining uniform distribution (#571)
- 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)
Expand Down
4 changes: 2 additions & 2 deletions bob-backend/src/pearl/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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));

Expand Down