fix oversized tracing span arguments; lints
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
e83fa12451
commit
527494a34b
3 changed files with 10 additions and 7 deletions
|
@ -296,7 +296,7 @@ pub(crate) fn repair(db_opts: &Options, path: &PathBuf) -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip_all, name = "rocksdb")]
|
||||
#[tracing::instrument(skip_all, name = "rocksdb", level = "debug")]
|
||||
pub(crate) fn handle_log(level: LogLevel, msg: &str) {
|
||||
let msg = msg.trim();
|
||||
if msg.starts_with("Options") {
|
||||
|
|
|
@ -209,20 +209,23 @@ impl Service {
|
|||
self.db.get_cached_eventid_authchain(key).await
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), level = "debug")]
|
||||
#[tracing::instrument(skip_all, level = "debug")]
|
||||
pub fn cache_auth_chain(&self, key: Vec<u64>, auth_chain: &HashSet<ShortEventId>) {
|
||||
let val = auth_chain.iter().copied().collect::<Arc<[ShortEventId]>>();
|
||||
let val: Arc<[ShortEventId]> = auth_chain.iter().copied().collect();
|
||||
|
||||
self.db.cache_auth_chain(key, val);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), level = "debug")]
|
||||
pub fn cache_auth_chain_vec(&self, key: Vec<u64>, auth_chain: &Vec<ShortEventId>) {
|
||||
let val = auth_chain.iter().copied().collect::<Arc<[ShortEventId]>>();
|
||||
#[tracing::instrument(skip_all, level = "debug")]
|
||||
pub fn cache_auth_chain_vec(&self, key: Vec<u64>, auth_chain: &[ShortEventId]) {
|
||||
let val: Arc<[ShortEventId]> = auth_chain.iter().copied().collect();
|
||||
|
||||
self.db.cache_auth_chain(key, val);
|
||||
}
|
||||
|
||||
pub fn get_cache_usage(&self) -> (usize, usize) {
|
||||
let cache = self.db.auth_chain_cache.lock().expect("locked");
|
||||
|
||||
(cache.len(), cache.capacity())
|
||||
}
|
||||
|
||||
|
|
|
@ -393,7 +393,7 @@ impl Service {
|
|||
}
|
||||
|
||||
/// This fetches auth events from the current state.
|
||||
#[tracing::instrument(skip(self), level = "debug")]
|
||||
#[tracing::instrument(skip(self, content), level = "debug")]
|
||||
pub async fn get_auth_events(
|
||||
&self, room_id: &RoomId, kind: &TimelineEventType, sender: &UserId, state_key: Option<&str>,
|
||||
content: &serde_json::value::RawValue,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue