feat(grpc-data): H3 ProjectedHistoryAccess over deployed connections
Resolves, authorizes (HistoryRead demand: mapping bit + local grant on the mapping scope, ACLs on or off) and pins each projected node, groups the batch per connection / details / issuing endpoint and forwards through IDataHistoryService. Remote cursors bind caller, mapping id+revision, connection route, projection generation, origin view and serving identity, and resend the ORIGINAL details; any change => BadContinuationPointInvalid with the origin token released. Shared per-request assembly budget (min mapping MaxHistoryAssemblyBytesPerRequest) => BadTooManyOperations for the remaining nodes. Releases coalesce per connection. Replaces the H2 refusal pin with the intended behaviour (granted => served, no grant => BadUserAccessDenied).
This commit is contained in:
+13
@@ -122,6 +122,19 @@ public sealed class ProjectedMappingDeploymentRuntime : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>H3: the mapping's per-request history assembly budget, while its activated authority is current.</summary>
|
||||
public bool TryGetHistoryAssemblyBudget(string mappingId, out long bytes)
|
||||
{
|
||||
bytes = 0;
|
||||
if (!TryGetConnectionId(mappingId, out _)) return false;
|
||||
lock (_gate)
|
||||
{
|
||||
if (!_byMapping.TryGetValue(mappingId, out var placement)) return false;
|
||||
bytes = placement.Mapping.MaxHistoryAssemblyBytesPerRequest;
|
||||
return bytes > 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void Stage(CatalogAttempt attempt, IReadOnlyList<RemoteNamespaceMapping> mappings, IReadOnlyList<DataConnection> connections)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(attempt);
|
||||
|
||||
Reference in New Issue
Block a user