Repository navigation
Commit 336e6b5
Remove every artificial throttle, repair the test oracles and the benchmark cells
The million-record CLUSTER ingestion gate never passed on a hosted runner:
ten SDK writers sharing one API key hit the per-principal HTTP admission
pool (eight concurrent requests per key per node) and got ResourceExhausted
or UnknownWriteOutcome within fifty seconds. The KeyLoad benchmark cells
stopped at exactly 100,000 records because the change outbox refused
producers once 100,000 entries were retained. The comparison harness also
gave KeyLoad nodes an admission profile that no other database had.
Measurements must show the real time of the work, so nothing refuses or
queues callers because other work is running.
Removed from request handling:
- HTTP admission (node/tenant/principal request counts, reserved control
requests and bytes, heavy-read and working-set reservations, per-route
body caps) and its KeyLoad:HttpAdmission section.
- Command admission (node/tenant/principal command counts, retained bytes,
the runtime-journal bootstrap control lane) and KeyLoad:CommandAdmission.
- The MCP retained-memory pools and KeyLoad:McpMemory; the MCP request state
keeps only the payload and reply ceilings.
- The admission status surface: GET /admin/admission, the SDK call, the
keyload_admin_admission MCP tool, the read kind (NodeStatus keeps wire
value 19), the grain/storage read methods and the dashboard card.
- Grain routing caps: request producers per silo, connections per node,
operations per connection and the per-silo active work count.
MaximumTotalFrames is now MaximumStreamFrames and only bounds the frames
one long-running response stream carries.
- The Postgres cancellation registration count cap.
- The benchmark KeyLoad admission profile and its observations.
Removed from the engine:
- DatabaseLimits.MaxConcurrentQueries: analytical reads keep one counted
reservation for release proofs, but the count never refuses.
- The change-outbox producer quota and projection progress reserve
(MaxOutboxRecords/Bytes, ReservedOutboxRecords/Bytes and the consumer's
LastProgressReservationCut); WriterQueueCapacity, which nothing used.
- The ANN reader caps per generation and slot and the ANN operation gate.
- TextExecutionOptions.MaximumActiveLeases: full-text readers, resource
leases and maintenance sessions are counted for joined shutdown only.
The bootstrap text projection keeps one reader per generation slot as a
structural rule of its file lifecycle.
- The unused CommandInboxExecutionOptions type.
A duplicate active request or request-work identity now fails with
Conflict instead of ResourceExhausted. The request body keeps one
server-wide Kestrel limit (KeyLoad:ServerExecution:MaximumBodyBytes,
32 MiB); per-operation data bounds, lifetimes and memory/disk planning are
unchanged.
The heavy-load sentinel oracle now expects the read reference bound to the
collection's resource lifetime, as the server returns it.
Tests that only exercised removed limits are deleted with their helpers;
tests that used them as scaffolding now check the behavior that remains:
uncapped request work with Conflict on duplicates, hundreds of concurrent
analytical reservations, a concurrent reservation during a held text
search, the outbox head corruption flow without a quota write, projection
receipts across compaction and reopen, and competing text maintenance
sessions. The unit inventory, product contributors, docs (ADR-145 replaces
ADR-042) and status.json describe the current design.
Product defect found by the test sweep: PartitionRef cached its atomic
partition hash in a private field, and a `with` copy carried the original's
hash, so `partition with { PartitionKey = ... }` reported the wrong
AtomicPartitionId. The cache now records the identity components it was
computed from and recomputes when they differ; a regression test covers it.
Unit oracles brought up to the current server contracts:
- Store-image oracles exclude or expect the system last-command row that
every command with a persisted outcome writes next to the applied
watermark.
- Queue, event and header oracles expect the caller's exact JSON text,
which the server preserves, instead of key-sorted copies; derived link
payloads are expected in the server's QueueGraphLink field order.
- Duplicate request-work identities expect Conflict; the MCP catalog no
longer counts the removed admission tool; ANN readers may overlap.
- Hosted Orleans fixtures get a 60-second start bound: every host start
builds the MCP tool-search graph, whose full-text indexing is serialized
process-wide in ManagedCode.MarkdownLd.Kb.
Packages: the owner's NuGet bump (ModelContextProtocol 2.3.0,
ManagedCode.Communication 10.3.15, Aspire 13.6.4, TUnit 1.76.0 and others)
is completed with ManagedCode.MCPGateway 2.3.0, released today on
ModelContextProtocol 2.3.0. MCP gateway invoke arguments are JsonElement
values; the new Communication analyzers' findings (redundant null guards,
negated IsSuccess) are fixed, including one latent benchmark check that
compared the read wrapper instead of its document with null.
Benchmarks:
- Target HTTP clients get the same 1 MiB response-header bound as document
clients; the OpenSearch update-by-query backfill runs on the target
client and returns about 230 KB of task headers.
- The MongoDB client runs on the host, where replica-set member names
(container aliases) do not resolve, so it connects directly to the
endpoints Aspire publishes for the primary and for each secondary.
- Neo4j cleanup deletes a million-node namespace in 10,000-node
transactions within a 10-minute bound instead of one transaction.
- KeyLoad cleanup reads every identifier in one cursor pass and then
deletes in batches; restarting the scan after each batch re-read every
earlier tombstone.
- Build and Tests uploads TRX results for every suite and bounds the Aspire
suite at 100 minutes so a slow run reports instead of being cancelled.
Verification: solution build with -warnaserror, dotnet format verify and the
governance check pass. The full unit project ran locally with ten parallel
tests before the oracle fixes (3641 cases, 135 failed, all known oracle,
analyzer-contract or load cases); after the fixes the previously failing
68 classes leave 10 failures at ten parallel tests, and all 10 pass when run
sequentially (MCP catalog build queueing and timing-sensitive ANN budget
cases under load). Integration, recovery and benchmark suites are left to
CI; the heavy-load gate was not rerun locally.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 32aea11 commit 336e6b5
401 files changed
Lines changed: 1518 additions & 8661 deletions
File tree
- .github/workflows
- benchmarks
- KeyLoad.BenchmarkScenarios/Benchmarks
- KeyLoad.ComparisonHost
- Configuration
- Hosting
- Session/Fixtures
- KeyLoad.Comparisons
- Configuration
- Documents
- Adapters
- Lifetimes
- Targets
- KeyLoad
- Diagnostics
- Execution
- Topology
- MongoDB
- Execution
- Topology
- Transport
- Neo4j
- Execution
- Queries
- TimeSeries
- Intensive/Validation
- Targets/KeyLoad
- build
- KeyLoad.AppHost
- Hosting
- TestInfrastructure/Configuration
- KeyLoad.LoadTests.AppHost
- Configuration
- Identity
- Resources
- docs
- ADR
- Features
- ClientApi
- DocumentStorage
- InternalSerialization
- Messaging
- OrleansExecution
- QueryExecution
- ResourceExecution
- Search
- StorageRecovery
- design
- implementation
- scripts/Features/CodeQuality
- src
- KeyLoad.Abstractions
- AdminDashboard/Contracts
- ChangeFeeds/Contracts
- ClientApi/Contracts
- CommandExecution/Serialization
- InternalSerialization/Serialization
- ResourceExecution/Contracts
- KeyLoad.Client
- AdminDashboard/Transport
- Messaging/Execution/QueueWorker
- KeyLoad.Clustering
- OrleansHosting/Contracts
- RequestExecution
- Configuration
- Contracts
- Models
- Queries/Connections
- Serialization
- Streaming
- ConnectionOperations
- CqrsStreams
- RequestWork
- ResourceExecution/Queries/Background
- Search
- Execution
- AnnMaintenance
- TextMaintenance
- Streaming
- StoragePartitions/Contracts
- StorageReplication
- Contracts
- Grains
- KeyLoad.Core
- ChangeFeeds/Execution
- ResourceExecution
- Admission
- Commands
- CommandAdmission
- Configuration
- Lifecycle
- Queries
- KeyLoad
- AdminDashboard
- Components
- Diagnostics
- Execution
- Transport
- AnalyticsStore/Hosting
- Authorization/Identity
- BlobStorage
- Queries
- Transport
- ClientApi
- Admission
- Configuration
- Contracts
- McpTool
- Mcp
- Discovery/Hosting
- Hosting
- McpMemory
- Mcp
- Lifecycle
- McpMemoryProjection
- Models
- Transport
- Mcp
- Validation
- OrleansHosting
- Hosting
- Lifecycle/Node
- Transport
- QueryExecution
- Queries
- Transport
- Search
- Admission
- Configuration
- Execution
- Ann
- FullText
- Incremental
- Online
- Lifecycle
- Ann
- FullText
- Incremental
- Online
- Projection
- Resource
- Selected
- Queries
- Storage/Ann
- StoragePartitions
- GrainServices
- Hosting
- tests
- KeyLoad.IntegrationTests
- ClientApi
- Assertions/Mcp
- Configuration/Mcp
- Contracts/Mcp
- DatabaseComposition/Models/FunctionalGates
- DocumentStorage
- Assertions
- Fixtures/Remote
- EventStreams/Cases/AggregateReplay
- GraphTraversal/Scenarios/Paths
- Messaging/Scenarios
- AtomicComposition
- Inbox/CompetingInbox
- Subscriptions
- OrleansExecution
- Cases/RequestId
- Scenarios/RequestExecution
- QueryExecution
- Cases/Sql/Cluster
- Scenarios/Distribution
- ResourceExecution
- Assertions
- Cases
- Configuration/Admission
- Contracts
- Fixtures
- Admission/Bodies
- Models
- Scenarios/Admission/Bodies
- Search
- Assertions/Graph
- Cases
- Graph
- RuntimeText
- Scenarios
- Graph
- Projections
- StorageReplication
- Contracts
- Resources
- Fixtures
- Lifecycle/ClusterFixture
- Scenarios
- Faults
- Resources
- TimeSeries
- Assertions/Retention
- Cases
- Scenarios/Retention
- KeyLoad.RecoveryTests
- AnalyticsStore/Execution
- Bounds
- Storage
- EventStreams
- Cases
- Fixtures
- Messaging/Execution/QueueConsumers
- OrleansExecution
- Configuration
- Fixtures/RequestExecution
- ResourceExecution/Configuration
- Search/Fixtures/FullText/Incremental
- StorageRecovery
- Execution
- Fixtures
- KeyLoad.UnitTests
- AnalyticsStore/Fixtures
- Authorization
- Assertions
- Credentials/Bootstrap
- Eventing
- PolicyEpochs
- Fixtures/Projection
- Scenarios
- Projection/SafeProjector
- ResourcePolicies
- ChangeFeeds
- Assertions
- Cases
- ChangeFeed
- Outbox
- Projection
- Fixtures
- Models
- Scenarios
- DocumentFeeds
- Projections
- ClientApi
- Assertions
- Mcp
- RuntimeCredential
- Cases
- McpGateway
- McpMemory
- McpRead
- McpUnknown
- RuntimeAuthentication
- RuntimeMcp
- Configuration/Mcp
- Fixtures
- CodeQuality/Assertions/Compilation
- DatabaseComposition
- Assertions
- Contracts
- Models
- Scenarios
- Bounds
- Links
- DocumentStorage/Cases/Document/DocumentMutation
- EventStreams
- GraphTraversal/Assertions/References
- Messaging
- Assertions
- QueueConsumers
- QueueLifecycle/Lifecycle
- QueueRetries
- QueueScheduling/Deadlines
- Subscriptions
- QueueLeases
- SubscriptionOld
- Contracts
- QueueConsumers
- QueueRetries
- Diagnostics
- Scenarios/RemoteTransfer/Identity
- OrleansExecution
- Assertions
- Connections
- RequestExecution
- Cases
- Connection
- RequestCqrs
- RuntimeRequest
- Contracts/RequestExecution
- Fixtures
- Scenarios
- Capacity
- Connections
- RequestExecution
- Lifecycle
- Streaming
- QueryExecution
- Cases
- SqlInner
- SqlOperation
- Fixtures/Composition
- Scenarios/Composition/ModelHead
- ResourceExecution
- Assertions
- Admission
- Routes
- Conservation
- Atomic
- Resources
- Tables
- Cases
- AdmissionOwnership
- AnalyticalAdmission
- Atomic
- CanonicalKey
- Command
- HeavyRoute
- HttpAdmission
- RuntimeJournal
- Sql
- TenantAdmission
- Configuration/Admission
- Fixtures
- Admission
- Routes
- Conservation/Atomic
- Lifecycle/Admission
- Models/Conservation
- Atomic
- Resources
- Scenarios
- Admission
- Routes
- Analytics
- Conservation/Atomic
- Journals
- Lifetime
- Search
- Assertions/Ann
- Lifecycle
- Cases/RuntimeText
- AsyncQueries
- Maintenance
- Scenarios
- Ann
- Search
- Vectors
- StorageRecovery
- Fixtures
- Analytics
- PartitionStorage
- Scenarios/Analytics
- TestInfrastructure/Cases/FixtureLifetime
- TimeSeries/Cases
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 62 | | |
74 | 63 | | |
75 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
80 | 77 | | |
81 | 78 | | |
82 | 79 | | |
| |||
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
104 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| |||
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
137 | 148 | | |
138 | 149 | | |
139 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
This file was deleted.
0 commit comments