fix(grpc-data): X0 inert all-unknown export rule no longer lowers the principal's limits; ValidateDeployed doc
This commit is contained in:
@@ -182,7 +182,10 @@ public sealed partial class LocalExportCatalog
|
||||
|
||||
internal DataLimits LimitsFor(string principal, DataLimits limits)
|
||||
{
|
||||
var rules = _exports.Where(x => string.Equals(x.Principal, principal, StringComparison.OrdinalIgnoreCase)).ToArray();
|
||||
// An inert rule (X0: only operation bits this build does not implement) grants nothing, so it cannot lower the
|
||||
// principal's limits on its other exports either.
|
||||
var rules = _exports.Where(x => string.Equals(x.Principal, principal, StringComparison.OrdinalIgnoreCase)
|
||||
&& x.Operations != DataOperations.None).ToArray();
|
||||
return rules.Length == 0 ? limits : limits with
|
||||
{
|
||||
MaxBatchItems = Math.Min(limits.MaxBatchItems, rules.Min(x => x.Batch)),
|
||||
|
||||
Reference in New Issue
Block a user