iemejia commented on code in PR #3865:
URL: https://github.com/apache/avro/pull/3865#discussion_r3568038988


##########
lang/java/avro/src/main/java/org/apache/avro/SystemLimitException.java:
##########
@@ -83,6 +90,34 @@ public class SystemLimitException extends 
AvroRuntimeException {
   public static final long MAX_DECOMPRESS_LENGTH = 
getLongLimitFromProperty(MAX_DECOMPRESS_LENGTH_PROPERTY,
       defaultMaxDecompressLength());
 
+  /**
+   * System property declaring the maximum number of array elements whose 
minimum
+   * encoded size is zero (e.g. {@code null}, a zero-length fixed, a record 
whose
+   * fields are all zero-byte, or a recursive schema conservatively treated as 
a 0
+   * minimum) to allocate at once: {@value}.
+   */
+  public static final String MAX_COLLECTION_ALLOCATION_PROPERTY = 
"org.apache.avro.limits.collectionItems.maxAllocation";
+
+  /**
+   * Fraction of the maximum heap a single decoded collection of zero-byte
+   * elements may occupy by default. Keeps the backing allocation below the 
heap
+   * so a small payload declaring a huge block count cannot exhaust the JVM.
+   */

Review Comment:
   Reworded — 'a single decoded collection of elements whose minimum encoded 
size is zero'.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to