Skip to content

Commit 6b80730

Browse files
committed
chore: Reduce the number of logs.
This patch removes some logs around the cross-process lock methods. This is called pretty often by the cross-process lock task, which pollute the log files.
1 parent 73449f4 commit 6b80730

File tree

6 files changed

+0
-28
lines changed

6 files changed

+0
-28
lines changed

crates/matrix-sdk-indexeddb/src/event_cache_store/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ impl EventCacheStore for IndexeddbEventCacheStore {
108108
key: &str,
109109
holder: &str,
110110
) -> Result<Option<CrossProcessLockGeneration>, IndexeddbEventCacheStoreError> {
111-
let _timer = timer!("method");
112-
113111
let transaction =
114112
self.transaction(&[Lease::OBJECT_STORE], IdbTransactionMode::Readwrite)?;
115113

crates/matrix-sdk-indexeddb/src/media_store/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ impl MediaStore for IndexeddbMediaStore {
111111
key: &str,
112112
holder: &str,
113113
) -> Result<Option<CrossProcessLockGeneration>, IndexeddbMediaStoreError> {
114-
let _timer = timer!("method");
115-
116114
let transaction = self.transaction(&[Lease::OBJECT_STORE], TransactionMode::Readwrite)?;
117115

118116
let now = Duration::from_millis(MilliSecondsSinceUnixEpoch::now().get().into());

crates/matrix-sdk-sqlite/src/crypto_store.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,8 +1501,6 @@ impl CryptoStore for SqliteCryptoStore {
15011501
key: &str,
15021502
holder: &str,
15031503
) -> Result<Option<CrossProcessLockGeneration>> {
1504-
let _timer = timer!("method");
1505-
15061504
let key = key.to_owned();
15071505
let holder = holder.to_owned();
15081506

crates/matrix-sdk-sqlite/src/event_cache_store.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ impl SqliteEventCacheStore {
167167
/// Acquire a connection for executing read operations.
168168
#[instrument(skip_all)]
169169
async fn read(&self) -> Result<SqliteAsyncConn> {
170-
trace!("Taking a `read` connection");
171-
let _timer = timer!("connection");
172-
173170
let connection = self.pool.get().await?;
174171

175172
// Per https://www.sqlite.org/foreignkeys.html#fk_enable, foreign key
@@ -184,9 +181,6 @@ impl SqliteEventCacheStore {
184181
/// Acquire a connection for executing write operations.
185182
#[instrument(skip_all)]
186183
async fn write(&self) -> Result<OwnedMutexGuard<SqliteAsyncConn>> {
187-
trace!("Taking a `write` connection");
188-
let _timer = timer!("connection");
189-
190184
let connection = self.write_connection.clone().lock_owned().await;
191185

192186
// Per https://www.sqlite.org/foreignkeys.html#fk_enable, foreign key
@@ -505,8 +499,6 @@ impl EventCacheStore for SqliteEventCacheStore {
505499
key: &str,
506500
holder: &str,
507501
) -> Result<Option<CrossProcessLockGeneration>> {
508-
let _timer = timer!("method");
509-
510502
let key = key.to_owned();
511503
let holder = holder.to_owned();
512504

crates/matrix-sdk-sqlite/src/media_store.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ impl SqliteMediaStore {
165165
// Acquire a connection for executing read operations.
166166
#[instrument(skip_all)]
167167
async fn read(&self) -> Result<SqliteAsyncConn> {
168-
trace!("Taking a `read` connection");
169-
let _timer = timer!("connection");
170-
171168
let connection = self.pool.get().await?;
172169

173170
// Per https://www.sqlite.org/foreignkeys.html#fk_enable, foreign key
@@ -182,9 +179,6 @@ impl SqliteMediaStore {
182179
// Acquire a connection for executing write operations.
183180
#[instrument(skip_all)]
184181
async fn write(&self) -> Result<OwnedMutexGuard<SqliteAsyncConn>> {
185-
trace!("Taking a `write` connection");
186-
let _timer = timer!("connection");
187-
188182
let connection = self.write_connection.clone().lock_owned().await;
189183

190184
// Per https://www.sqlite.org/foreignkeys.html#fk_enable, foreign key
@@ -245,8 +239,6 @@ impl MediaStore for SqliteMediaStore {
245239
key: &str,
246240
holder: &str,
247241
) -> Result<Option<CrossProcessLockGeneration>> {
248-
let _timer = timer!("method");
249-
250242
let key = key.to_owned();
251243
let holder = holder.to_owned();
252244

crates/matrix-sdk-sqlite/src/state_store.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -459,18 +459,12 @@ impl SqliteStateStore {
459459
/// Acquire a connection for executing read operations.
460460
#[instrument(skip_all)]
461461
async fn read(&self) -> Result<SqliteAsyncConn> {
462-
trace!("Taking a `read` connection");
463-
let _timer = timer!("connection");
464-
465462
Ok(self.pool.get().await?)
466463
}
467464

468465
/// Acquire a connection for executing write operations.
469466
#[instrument(skip_all)]
470467
async fn write(&self) -> OwnedMutexGuard<SqliteAsyncConn> {
471-
trace!("Taking a `write` connection");
472-
let _timer = timer!("connection");
473-
474468
self.write_connection.clone().lock_owned().await
475469
}
476470

0 commit comments

Comments
 (0)