Skip to content

Conversation

@Arqu
Copy link
Collaborator

@Arqu Arqu commented Dec 22, 2025

Description

Two simple gauges to just have basic info about the cache sizes at runtime.

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

@Arqu Arqu requested review from Frando and rklaehn December 22, 2025 12:16
@Arqu Arqu self-assigned this Dec 22, 2025
@Arqu Arqu added this to iroh Dec 22, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Dec 22, 2025
@Arqu Arqu moved this from 🏗 In progress to 👀 In review in iroh Dec 22, 2025
@github-actions
Copy link

github-actions bot commented Dec 22, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3800/docs/iroh/

Last updated: 2025-12-22T14:47:05Z

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 37f73c3

) -> 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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

.await
.insert_and_resolve_dht(&packet, name, record_type);
let result = cache.insert_and_resolve_dht(&packet, name, record_type);
self.metrics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change?

@github-project-automation github-project-automation bot moved this from 👀 In review to 🏗 In progress in iroh Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

3 participants