fix(grpc-data): H2 review2-7c - MaxHistoryResponseBytes minimum 256 KiB (validator + AdminUI min)
Wire tests that relied on a 1-byte response cap now exercise chunking with wide string values at the minimum.
This commit is contained in:
@@ -26,6 +26,8 @@ public static class DataConnectionValidator
|
||||
public const int MaxHistoryValuesPerPageLimit = 1_000_000;
|
||||
/// <summary>Largest <c>DataExport.MaxHistoryResponseBytes</c> (64 MiB).</summary>
|
||||
public const int MaxHistoryResponseBytesLimit = 64 * 1024 * 1024;
|
||||
/// <summary>Smallest <c>DataExport.MaxHistoryResponseBytes</c> (256 KiB): below it a page of ordinary values cannot fit.</summary>
|
||||
public const int MinHistoryResponseBytesLimit = 256 * 1024;
|
||||
/// <summary>Largest <c>RemoteNamespaceMapping.MaxHistoryAssemblyBytesPerRequest</c> (1 GiB).</summary>
|
||||
public const int MaxHistoryAssemblyBytesLimit = 1024 * 1024 * 1024;
|
||||
|
||||
@@ -303,7 +305,7 @@ public static class DataConnectionValidator
|
||||
if (export.MaxBatchItems <= 0 || export.MaxPageItems <= 0 || export.MaxMonitoredItems <= 0 || export.MaxStreams <= 0 ||
|
||||
export.MaxConcurrentHistoryReads <= 0 || export.MaxConcurrentHistoryReads > MaxConcurrentHistoryReadsLimit ||
|
||||
export.MaxHistoryValuesPerPage <= 0 || export.MaxHistoryValuesPerPage > MaxHistoryValuesPerPageLimit ||
|
||||
export.MaxHistoryResponseBytes <= 0 || export.MaxHistoryResponseBytes > MaxHistoryResponseBytesLimit)
|
||||
export.MaxHistoryResponseBytes < MinHistoryResponseBytesLimit || export.MaxHistoryResponseBytes > MaxHistoryResponseBytesLimit)
|
||||
Add("DataExportLimitInvalid", id, "Export limits must be positive.");
|
||||
}
|
||||
return errors;
|
||||
|
||||
Reference in New Issue
Block a user