flyrain commented on code in PR #4545:
URL: https://github.com/apache/polaris/pull/4545#discussion_r3312643861
##########
persistence/nosql/persistence/metastore/src/main/java/org/apache/polaris/persistence/nosql/metastore/mutation/PolicyMutation.java:
##########
@@ -47,6 +49,20 @@ public record PolicyMutation(
long targetId,
boolean doAttach,
@NonNull Map<String, String> parameters) {
+ /**
+ * Conservative limit for serialized policy-mapping index value size to
ensure that the serialized
+ * index-entry value sizes don't grow too large.
+ *
+ * <p>If this limit is ever exceeded, there are two options:
+ *
+ * <ul>
+ * <li>If it's a marginal increase, it's possible to increase this value.
+ * <li>If the property bag is becoming too big, the policy mapping should
be stored in a
+ * separate new {@link Obj}ect.
+ * </ul>
+ */
+ public static final int MAX_POLICY_MAPPING_INDEX_VALUE_SIZE = 384;
Review Comment:
How was 384 picked? The javadoc explains how to evolve it but not the
rationale , a short note (typical param-bag size + headroom, or measured
serialized size of expected real-world entries) would help a future reviewer
judge whether a bump is safe.
--
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]