Skip to content

Commit 0a141fb

Browse files
committed
chore: add logs
1 parent 59f79cc commit 0a141fb

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

collab/src/database/blocks/block.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ impl Block {
5353
self.notifier.subscribe()
5454
}
5555

56+
#[instrument(level = "debug", skip_all)]
5657
pub async fn batch_load_rows(&self, row_ids: Vec<RowId>) -> Result<(), CollabError> {
5758
let cloned_notifier = self.notifier.clone();
5859
let mut row_on_disk_details = vec![];
@@ -192,6 +193,7 @@ impl Block {
192193
}
193194

194195
/// Get the [DatabaseRow] from the cache. If the row is not in the cache, initialize it.
196+
#[instrument(level = "debug", skip_all)]
195197
pub fn init_database_row(&self, row_id: &RowId, ret: Option<InitRowChan>) {
196198
let row_id = *row_id;
197199
let row_change_tx = self.row_change_tx.clone();
@@ -217,6 +219,7 @@ impl Block {
217219
.map_err(|e| CollabError::Internal(anyhow::anyhow!(e)))?
218220
}
219221

222+
#[instrument(level = "debug", skip_all)]
220223
pub async fn init_database_rows(
221224
&self,
222225
row_ids: Vec<RowId>,

collab/src/database/database.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ impl Database {
575575
self.body.block.init_database_row(row_id, ret)
576576
}
577577

578+
#[instrument(level = "debug", skip_all)]
578579
pub fn init_database_rows<'a, T: Into<RowId> + Send + 'a>(
579580
&'a self,
580581
row_ids: Vec<T>,
@@ -2090,6 +2091,7 @@ impl DatabaseBody {
20902091
}
20912092

20922093
/// Return list of [RowCell] for the given view and field.
2094+
#[instrument(level = "debug", skip_all)]
20932095
pub async fn get_cells_for_field<T: ReadTxn>(
20942096
&self,
20952097
txn: &T,

collab/src/database/database_trait.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use rayon::prelude::*;
1919
use std::borrow::BorrowMut;
2020
use std::collections::HashMap;
2121
use std::sync::Arc;
22+
use tracing::instrument;
2223
use yrs::block::ClientID;
2324

2425
// Database holder tracks initialization status and holds the database reference
@@ -263,6 +264,7 @@ where
263264
Ok(arc_row)
264265
}
265266

267+
#[instrument(level = "debug", skip_all)]
266268
async fn batch_build_arc_database_row(
267269
&self,
268270
row_ids: &[RowId],

0 commit comments

Comments
 (0)