Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3800/docs/iroh/ Last updated: 2026-04-09T11:33:09Z |
iroh-dns-server/src/store.rs
Outdated
| ) -> Result<Option<Arc<RecordSet>>> { | ||
| trace!("store resolve"); | ||
| if let Some(rset) = self.cache.lock().await.resolve(pubkey, name, record_type) { | ||
| let mut cache = self.cache.lock().await; |
There was a problem hiding this comment.
This will now hold a lock on the cache until the end of the function, which can include a DHT resolve which can take long. Whereas previously the lock would only be held shortly. If you do want to keep a lock around the guaranteed-to-be-fast operations, then I propose to do a block scopes ({ ... }) that makes it clear for how long the lock is held.
iroh-dns-server/src/store.rs
Outdated
| .await | ||
| .insert_and_resolve_dht(&packet, name, record_type); | ||
| let result = cache.insert_and_resolve_dht(&packet, name, record_type); | ||
| self.metrics |
There was a problem hiding this comment.
Maybe move the metrics tracking into the cache itself? Then you can't miss updating it. (i.e. clone the metrics into ZoneCache and update the metrics whenever something changes from there.
| use quinn_proto::{ | ||
| VarInt, | ||
| coding::{Codec, UnexpectedEnd}, | ||
| coding::{Decodable, Encodable, UnexpectedEnd}, |
|
does this still live? |
|
It should, I'll get to it ASAP. |
effa661 to
03f9f00
Compare
Description
Two simple gauges to just have basic info about the cache sizes at runtime.
Breaking Changes
Notes & open questions
Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendme