[PR #6860] [MERGED] fix: RwLock race condition during group controller instantiation #7610

Closed
opened 2026-03-23 23:20:25 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6860
Author: @richardshiue
Created: 11/26/2024
Status: Merged
Merged: 11/28/2024
Merged by: @appflowy

Base: mainHead: fix/6816


📝 Commits (9)

📊 Changes

13 files changed (+114 additions, -35 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/database/application/tab_bar_bloc.dart (+1 -2)
📝 frontend/appflowy_flutter/lib/plugins/database/board/presentation/board_page.dart (+2 -4)
📝 frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs (+33 -4)
📝 frontend/rust-lib/flowy-database2/src/services/database_view/view_group.rs (+1 -2)
📝 frontend/rust-lib/flowy-database2/src/services/database_view/views.rs (+6 -1)
📝 frontend/rust-lib/flowy-database2/src/services/group/action.rs (+1 -0)
📝 frontend/rust-lib/flowy-database2/src/services/group/controller.rs (+26 -10)
📝 frontend/rust-lib/flowy-database2/src/services/group/controller_impls/date_controller.rs (+1 -1)
📝 frontend/rust-lib/flowy-database2/src/services/group/controller_impls/default_controller.rs (+16 -1)
📝 frontend/rust-lib/flowy-database2/src/services/group/controller_impls/select_option_controller/multi_select_controller.rs (+1 -0)
📝 frontend/rust-lib/flowy-database2/src/services/group/controller_impls/select_option_controller/single_select_controller.rs (+1 -0)
📝 frontend/rust-lib/flowy-database2/src/services/group/group_builder.rs (+3 -10)
📝 frontend/rust-lib/flowy-database2/tests/database/group_test/url_group_test.rs (+22 -0)

📄 Description

resolves https://github.com/AppFlowy-IO/AppFlowy/issues/6816

This fix introduces a regression to the calculation feature. Therefore, another solution needs to be found

Sometimes a bug fix is dirty. But sometimes a dirty bug fix works.

The test doesn't pass on main

Feature Preview


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/6860 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 11/26/2024 **Status:** ✅ Merged **Merged:** 11/28/2024 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `fix/6816` --- ### 📝 Commits (9) - [`45f7d6e`](https://github.com/AppFlowy-IO/AppFlowy/commit/45f7d6e703a48937076397c0969dd9cce25a3d83) chore: code cleanup - [`f337acd`](https://github.com/AppFlowy-IO/AppFlowy/commit/f337acd8105fd445918666d149e333deed1310e3) fix: view editor used during initialization - [`17d15e0`](https://github.com/AppFlowy-IO/AppFlowy/commit/17d15e091139968dab7d158ad4ec3a71c1359ba6) fix: quick and dirty hack job - [`c3b4d7a`](https://github.com/AppFlowy-IO/AppFlowy/commit/c3b4d7ada7cd8395b6a2150671be7a8d37d28e30) test: add test - [`9408d22`](https://github.com/AppFlowy-IO/AppFlowy/commit/9408d22b1f4feb29268d1248c46f0ba98b6f6b35) chore: don't create separate mut var - [`d4a62b1`](https://github.com/AppFlowy-IO/AppFlowy/commit/d4a62b1210493fe2515f5f6ded977e3254e97d0f) chore: docs - [`49c0b37`](https://github.com/AppFlowy-IO/AppFlowy/commit/49c0b37c0478b6a744574c6eaa26a6fbcb7d48a5) fix: uninitialized group controllers - [`3442d4d`](https://github.com/AppFlowy-IO/AppFlowy/commit/3442d4d62793590f3a44fb22599a284cf571903e) chore: remove group - [`44f49f6`](https://github.com/AppFlowy-IO/AppFlowy/commit/44f49f6cab6fda2315e517accf4936dc3ec5c665) chore: fix test ### 📊 Changes **13 files changed** (+114 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/database/application/tab_bar_bloc.dart` (+1 -2) 📝 `frontend/appflowy_flutter/lib/plugins/database/board/presentation/board_page.dart` (+2 -4) 📝 `frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs` (+33 -4) 📝 `frontend/rust-lib/flowy-database2/src/services/database_view/view_group.rs` (+1 -2) 📝 `frontend/rust-lib/flowy-database2/src/services/database_view/views.rs` (+6 -1) 📝 `frontend/rust-lib/flowy-database2/src/services/group/action.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-database2/src/services/group/controller.rs` (+26 -10) 📝 `frontend/rust-lib/flowy-database2/src/services/group/controller_impls/date_controller.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-database2/src/services/group/controller_impls/default_controller.rs` (+16 -1) 📝 `frontend/rust-lib/flowy-database2/src/services/group/controller_impls/select_option_controller/multi_select_controller.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-database2/src/services/group/controller_impls/select_option_controller/single_select_controller.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-database2/src/services/group/group_builder.rs` (+3 -10) 📝 `frontend/rust-lib/flowy-database2/tests/database/group_test/url_group_test.rs` (+22 -0) </details> ### 📄 Description resolves https://github.com/AppFlowy-IO/AppFlowy/issues/6816 ~~This fix introduces a regression to the calculation feature. Therefore, another solution needs to be found~~ Sometimes a bug fix is dirty. But sometimes a dirty bug fix works. The test doesn't pass on main ### Feature Preview <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:20:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#7610
No description provided.