Compare commits

...
4 Commits
Author SHA1 Message Date
Matthew Jackson db3b78e1f9 docs: 1.8.2 release notes 2026-10-07 09:59:54 -07:00
Matthew Jackson f44de130b6 docs: shorter changelog entry for the online timing logs 2026-10-07 08:47:00 -07:00
Matthew Jackson c562bfbad0 online: log the connection-slot wait and DNS lookup time
Address count only, never the address. Separates local waits from the
key-service POST when a lookup is slow.
2026-10-07 03:31:30 -07:00
Matthew Jackson bd07927292 v1.8.1: bump version (unified release) 2026-10-07 03:56:41 +00:00
3 changed files with 26 additions and 5 deletions
+7 -1
View File
@@ -1,6 +1,12 @@
# Changelog
## [1.8.1] — Unreleased
## [1.8.2] — Unreleased
### Added
- The online source logs its connection-slot wait and DNS time before each request.
## [1.8.1] — 2026-10-07
### Changed
+3 -3
View File
@@ -1,6 +1,6 @@
[package]
name = "freemkv-keysources"
version = "1.8.0"
version = "1.8.1"
edition = "2024"
rust-version = "1.88"
license = "MIT"
@@ -49,8 +49,8 @@ codegen-units = 1
# overrides it with a path patch via the gitignored .cargo/config.toml (a
# config-level [patch.crates-io] wins over this manifest one for the same crate).
[patch.crates-io]
libfreemkv = { git = "https://github.com/freemkv/libfreemkv", tag = "v1.8.0" }
freemkv-unlock = { git = "https://github.com/freemkv/freemkv-unlock", tag = "v1.8.0" }
libfreemkv = { git = "https://github.com/freemkv/libfreemkv", tag = "v1.8.1" }
freemkv-unlock = { git = "https://github.com/freemkv/freemkv-unlock", tag = "v1.8.1" }
[lints.clippy]
uninlined_format_args = "allow"
+16 -1
View File
@@ -517,7 +517,9 @@ fn run_on_worker(
halt: &Halt,
work: impl FnOnce() -> WorkerOutcome + Send + 'static,
) -> Result<Vec<UnitKey>, Error> {
let waited = std::time::Instant::now();
let slot = acquire_query_slot(host, halt)?;
tracing::info!(target: "freemkv::keysource", phase = "keyserver_slot", waited_ms = waited.elapsed().as_millis() as u64, "key-service connection slot acquired");
let (tx, rx) = mpsc::channel();
let spawned = std::thread::Builder::new()
.name("keysource-online".into())
@@ -788,7 +790,20 @@ impl PostJob {
None => resolve_and_guard(&self.url),
};
#[cfg(not(test))]
let guarded = resolve_and_guard(&self.url);
let guarded = {
let t0 = std::time::Instant::now();
let g = resolve_and_guard(&self.url);
// Count only: the addresses themselves are never logged.
tracing::info!(
target: "freemkv::keysource",
phase = "keyserver_dns",
ok = g.is_ok(),
addrs = g.as_ref().map(|a| a.len()).unwrap_or(0),
elapsed_ms = t0.elapsed().as_millis() as u64,
"key-service host resolved"
);
g
};
// Resolve + SSRF-guard the host just before the POST and pin the validated addresses,
// so a DNS rebind after config time can't redirect the request to an internal host.
let pinned = match guarded {