Skip to content

Commit 1f9a03a

Browse files
authored
chore: enable lock timeout feature (#771)
1 parent 3e701a1 commit 1f9a03a

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ percent-encoding = "2.3.1"
111111
appflowy-ai-client = { workspace = true, features = ["dto", "client-api"] }
112112
pgvector = { workspace = true, features = ["sqlx"] }
113113

114-
collab = { workspace = true }
114+
collab = { workspace = true, features = ["lock_timeout"] }
115115
collab-document = { workspace = true }
116116
collab-entity = { workspace = true }
117117
collab-folder = { workspace = true }
@@ -285,12 +285,12 @@ debug = true
285285
[patch.crates-io]
286286
# It's diffcult to resovle different version with the same crate used in AppFlowy Frontend and the Client-API crate.
287287
# So using patch to workaround this issue.
288-
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5a1e94d60eea2c8612b2895dbbbdd6e5d5f03d97" }
289-
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5a1e94d60eea2c8612b2895dbbbdd6e5d5f03d97" }
290-
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5a1e94d60eea2c8612b2895dbbbdd6e5d5f03d97" }
291-
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5a1e94d60eea2c8612b2895dbbbdd6e5d5f03d97" }
292-
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5a1e94d60eea2c8612b2895dbbbdd6e5d5f03d97" }
293-
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5a1e94d60eea2c8612b2895dbbbdd6e5d5f03d97" }
288+
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
289+
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
290+
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
291+
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
292+
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
293+
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
294294

295295
[features]
296296
history = []

services/appflowy-collaborate/src/group/state.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use dashmap::mapref::one::RefMut;
66
use dashmap::try_result::TryResult;
77
use dashmap::DashMap;
88
use tokio::time::sleep;
9-
use tracing::{error, event, warn};
9+
use tracing::{error, event, info, warn};
1010

1111
use collab_rt_entity::user::RealtimeUser;
1212

@@ -39,12 +39,13 @@ impl GroupManagementState {
3939
let (object_id, group) = (entry.key(), entry.value());
4040
if group.is_inactive().await {
4141
inactive_group_ids.push(object_id.clone());
42-
if inactive_group_ids.len() > 5 {
42+
if inactive_group_ids.len() > 10 {
4343
break;
4444
}
4545
}
4646
}
4747

48+
info!("Remove inactive group ids: {:?}", inactive_group_ids);
4849
for object_id in &inactive_group_ids {
4950
self.remove_group(object_id).await;
5051
}

0 commit comments

Comments
 (0)