mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-02 11:04:02 +00:00
chore: update logs
This commit is contained in:
parent
187c5892ea
commit
dbe17aa4e8
@ -13,7 +13,7 @@ use flowy_notification::{DebounceNotificationSender, NotificationBuilder};
|
||||
use futures::StreamExt;
|
||||
use lib_dispatch::prelude::af_spawn;
|
||||
use std::sync::Arc;
|
||||
use tracing::{error, info, trace, warn};
|
||||
use tracing::{error, trace, warn};
|
||||
|
||||
pub(crate) async fn observe_sync_state(database_id: &str, database: &Arc<RwLock<Database>>) {
|
||||
let weak_database = Arc::downgrade(database);
|
||||
@ -202,13 +202,6 @@ async fn handle_did_update_row_orders(
|
||||
let mut view_row_orders = database_view.row_orders.write().await;
|
||||
if view_row_orders.len() >= index as usize {
|
||||
view_row_orders.insert(index as usize, row_order.clone());
|
||||
info!(
|
||||
"[RowOrder]: view row orders after:{:?}",
|
||||
view_row_orders
|
||||
.iter()
|
||||
.map(|x| x.id.to_string())
|
||||
.collect::<Vec<String>>()
|
||||
);
|
||||
} else {
|
||||
warn!(
|
||||
"[RowOrder]: insert row at index:{} out of range:{}",
|
||||
@ -252,8 +245,6 @@ async fn handle_did_update_row_orders(
|
||||
let lazy_row = view_row_orders.remove(index);
|
||||
// Update changeset in RowsChangePB
|
||||
let row_id = lazy_row.id.to_string();
|
||||
trace!("[RowOrder]: try to delete row:{}", lazy_row.id);
|
||||
|
||||
let mut row_change = database_view_rows
|
||||
.entry(database_view.view_id.clone())
|
||||
.or_default();
|
||||
@ -262,7 +253,7 @@ async fn handle_did_update_row_orders(
|
||||
// notify the view
|
||||
if let Some(row) = database_view.row_by_row_id.get(lazy_row.id.as_str()) {
|
||||
trace!(
|
||||
"[RowOrder]: Did delete row:{} at index:{}, is_move_row: {}, is_local:{}",
|
||||
"[RowOrder]: delete row:{} at index:{}, is_move_row: {}, is_local:{}",
|
||||
row.id,
|
||||
index,
|
||||
row_change.is_move_row,
|
||||
|
||||
@ -43,7 +43,7 @@ use dashmap::DashMap;
|
||||
use flowy_error::{FlowyError, FlowyResult};
|
||||
use lib_infra::util::timestamp;
|
||||
use tokio::sync::{broadcast, RwLock};
|
||||
use tracing::instrument;
|
||||
use tracing::{instrument, trace};
|
||||
|
||||
pub struct DatabaseViewEditor {
|
||||
database_id: String,
|
||||
@ -1250,7 +1250,7 @@ impl DatabaseViewEditor {
|
||||
async fn handle_mut_group_result(view_id: &str, result: Option<DidMoveGroupRowResult>) {
|
||||
if let Some(result) = result {
|
||||
if let Some(deleted_group) = result.deleted_group {
|
||||
tracing::trace!("Delete group after moving the row: {:?}", deleted_group);
|
||||
trace!("Delete group after moving the row: {:?}", deleted_group);
|
||||
let payload = GroupChangesPB {
|
||||
view_id: view_id.to_string(),
|
||||
deleted_groups: vec![deleted_group.group_id],
|
||||
@ -1259,6 +1259,7 @@ async fn handle_mut_group_result(view_id: &str, result: Option<DidMoveGroupRowRe
|
||||
notify_did_update_num_of_groups(view_id, payload).await;
|
||||
}
|
||||
for changeset in result.row_changesets {
|
||||
trace!("[RowOrder]: group row changeset: {:?}", changeset);
|
||||
notify_did_update_group_rows(changeset).await;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,11 +4,11 @@ use std::sync::Arc;
|
||||
|
||||
use collab_database::fields::{Field, TypeOptionData};
|
||||
use collab_database::rows::{Cells, Row, RowId};
|
||||
use flowy_error::{FlowyError, FlowyResult};
|
||||
use futures::executor::block_on;
|
||||
use serde::de::DeserializeOwned;
|
||||
use serde::Serialize;
|
||||
|
||||
use flowy_error::{FlowyError, FlowyResult};
|
||||
use tracing::trace;
|
||||
|
||||
use crate::entities::{
|
||||
FieldType, GroupChangesPB, GroupPB, GroupRowsNotificationPB, InsertedGroupPB, InsertedRowPB,
|
||||
@ -310,6 +310,7 @@ where
|
||||
}
|
||||
|
||||
fn did_delete_row(&mut self, row: &Row) -> FlowyResult<DidMoveGroupRowResult> {
|
||||
trace!("[RowOrder]: group did_delete_row: {:?}", row.id);
|
||||
let mut result = DidMoveGroupRowResult {
|
||||
deleted_group: None,
|
||||
row_changesets: vec![],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user