feat(runtime): ServerHistorian HistoryRead parallelism/limiter/deadline knobs + node-manager wiring (03/S3)

This commit is contained in:
Joseph Doherty
2026-07-13 12:03:27 -04:00
parent d5c6609cdf
commit 304442dba4
5 changed files with 117 additions and 1 deletions
@@ -50,4 +50,55 @@ public sealed class ServerHistorianOptionsTests
.Validate();
Assert.Contains(w, m => m.Contains("MaxTieClusterOverfetch"));
}
// ── S3 HistoryRead concurrency knobs (arch-review 03/S3) ────────────────────────────────────
[Fact]
public void HistoryRead_knob_defaults()
{
var o = new ServerHistorianOptions();
Assert.Equal(4, o.HistoryReadBatchParallelism);
Assert.Equal(16, o.MaxConcurrentHistoryReadBatches);
Assert.Equal(TimeSpan.FromSeconds(60), o.HistoryReadDeadline);
}
[Fact]
public void Enabled_with_nonpositive_HistoryReadBatchParallelism_warns()
{
var w = new ServerHistorianOptions
{ Enabled = true, Endpoint = "https://h:5222", ApiKey = "histgw_x_y", HistoryReadBatchParallelism = 0 }
.Validate();
Assert.Contains(w, m => m.Contains("HistoryReadBatchParallelism"));
}
[Fact]
public void Enabled_with_nonpositive_MaxConcurrentHistoryReadBatches_warns()
{
var w = new ServerHistorianOptions
{ Enabled = true, Endpoint = "https://h:5222", ApiKey = "histgw_x_y", MaxConcurrentHistoryReadBatches = 0 }
.Validate();
Assert.Contains(w, m => m.Contains("MaxConcurrentHistoryReadBatches"));
}
[Fact]
public void Enabled_with_nonpositive_HistoryReadDeadline_warns()
{
var w = new ServerHistorianOptions
{ Enabled = true, Endpoint = "https://h:5222", ApiKey = "histgw_x_y", HistoryReadDeadline = TimeSpan.Zero }
.Validate();
Assert.Contains(w, m => m.Contains("HistoryReadDeadline"));
}
[Fact]
public void Disabled_with_nonpositive_HistoryRead_knobs_is_silent()
{
var w = new ServerHistorianOptions
{
Enabled = false,
HistoryReadBatchParallelism = 0,
MaxConcurrentHistoryReadBatches = 0,
HistoryReadDeadline = TimeSpan.Zero,
}.Validate();
Assert.Empty(w);
}
}